Reputation: 11
I've been trying to init a new react-native project and always run into the same ETIMEDOUT error.
I've run "react-native init AwesomeProject --verbose" on Terminal
Here is my npm-debug.log: https://gist.github.com/danielweinmann/a3a05ec4c253b9ff0016
I've tried setting npm registry to registry.npmjs.org with both http and https on the URL.
I started testing on a Mountain Lion and then upgraded to El Capitan and continued to get the same result
It seems to install all dependencies correctly and successfuly make all afterAdd writes to package.json, but throws the error after an "unlock" verb that's executed after an "about to build".
Here's the last part of my terminal screen:
npm verb afterAdd /Users/danielweinmann/.npm/uglify-js/2.4.24/package/package.json written
npm verb about to build /Users/danielweinmann/projects/AwesomeProject/node_modules/react-native
npm verb unlock done using /Users/danielweinmann/.npm/_locks/react-native-b39cdeb3f4f93e0a.lock for /Users/danielweinmann/projects/AwesomeProject/node_modules/react-native
npm verb stack Error: connect ETIMEDOUT 23.235.46.162:443
npm verb stack at Object.exports._errnoException (util.js:856:11)
npm verb stack at exports._exceptionWithHostPort (util.js:879:20)
npm verb stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)
npm verb cwd /Users/danielweinmann/projects/AwesomeProject
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node/5.4.1/bin/node" "/usr/local/bin/npm" "install" "--verbose" "--save" "react-native"
npm ERR! node v5.4.1
npm ERR! npm v2.14.15
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT 23.235.46.162:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is 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 verb exit [ 1, true ]
npm verb unbuild node_modules/react-native
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm verb unbuild rmStuff [email protected] from /Users/danielweinmann/projects/AwesomeProject/node_modules
npm verb gentlyRm vacuuming from /Users/danielweinmann/projects/AwesomeProject/node_modules/.bin/react-native up to /Users/danielweinmann/projects/AwesomeProject
npm info postuninstall [email protected]
npm verb gentlyRm don't care about contents; nuking /Users/danielweinmann/projects/AwesomeProject/node_modules/react-native
npm ERR! Please include the following file with any support request:
npm ERR! /Users/danielweinmann/projects/AwesomeProject/npm-debug.log
`npm install --save react-native` failed
Does anyone know what's happening? Can anyone help me?
Thanks a lot!
Upvotes: 0
Views: 1502
Reputation: 763
In my case I have to disable firewall on my belkin router. Related to https://github.com/npm/npm/issues/8293 not react-native specific
Upvotes: 0
Reputation: 11
In the end, it was a network issue, indeed. I solved it by routing my mobile phone's internet connection to my computer through wi-fi.
Upvotes: 1