npm command create-react-app failled
Solution 1
You seem to be behind a corporate proxy, as wsg.intra.corp.grp:8080
is mentioned in the logs.
You need to configure the proxy like shown in this guide.
Hope this helps!
Solution 2
I solved this issue just by, go to settings>Network and Internet>Proxy and then off Automatically detect settings under Automatic proxy setup on Windows. And then the installation worked fine.
Solution 3
Run below commands on your command prompt. Make sure node and npm are installed.
npm config rm proxy
npm config rm https-proxy
open this link in your browser: https://registry.npmjs.org/
Run below command to set registry.
npm config set registry https://registry.npmjs.org/
Hope its help : )
franckfournier
Senior Software architect, Computer engineer, skilled in Python/Django, C++, realtime and distributed computing
Updated on June 04, 2022Comments
-
franckfournier almost 2 years
I am trying to test reactjs on my computer (mbp pro 2017) running OsX sierra 10.12.6. I have followed the Facebook tutorial:
- Make sure you have a recent version of Node.js installed. (done)
- Follow the installation instructions to create a new project. https://facebook.github.io/react/docs/installation.html#creating-a-new-application
But i have a problem on this second step !
- I am not behind a proxy.
- my network is ok.
- The repository is set to registry.npmjs.org
- i can read the url : https://registry.npmjs.org/create-react-app
- But this domain is not found even on external DNS wsg.intra.corp.grp
I'am stuck, any help will be nice !
$ npm install -g create-react-app npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! ~/.npm/_logs/2017-09-01T08_15_13_521Z-debug.log
And the log file :
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'create-react-app' ] 2 info using [email protected] 3 info using [email protected] 4 verbose npm-session 4811d091ad74f9ef 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 silly fetchPackageMetaData error for create-react-app@latest request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080 8 verbose type system 9 verbose stack FetchError: request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080 9 verbose stack at ClientRequest.req.on.err (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:68:14) 9 verbose stack at emitOne (events.js:115:13) 9 verbose stack at ClientRequest.emit (events.js:210:7) 9 verbose stack at onerror (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:106:9) 9 verbose stack at callbackError (/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:126:5) 9 verbose stack at <anonymous> 9 verbose stack at process._tickCallback (internal/process/next_tick.js:188:7) 10 verbose cwd /Users/franckfournier/PycharmProjects/projectX/react 11 verbose Darwin 16.7.0 12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "create-react-app" 13 verbose node v8.4.0 14 verbose npm v5.3.0 15 error code ENOTFOUND 16 error errno ENOTFOUND 17 error network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND wsg.intra.corp.grp wsg.intra.corp.grp:8080 18 error network This is a problem related to network connectivity. 18 error network In most cases you are behind a proxy or have bad network settings. 18 error network 18 error network If you are behind a proxy, please make sure that the 18 error network 'proxy' config is set properly. See: 'npm help config' 19 verbose exit [ 1, true ]
-
franckfournier over 6 yearsI'am at home no proxy is configured ??? do you think my computer os is boken or hacked ?? Because it works correclty on an ubuntu vm running on the same machine ?
-
franckfournier over 6 yearsSo the question is : who and how the proxy is configured nothing apear in osx network settings ?
-
franckfournier over 6 yearsThanks i have understand it's npm that was configured with a proxy not my computer i am a dumb idiot, sorry and thanks for answering