Reputation: 483
I used node.js to install some things via npm without any problems. Now I changed nothing on my settings (Win8; no proxy, internet is working) and I can't install anything (especially cordova and ionic). It only throws errors like I'm behind a proxy, but I'm not.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "i" "-g" "ionic"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
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 ERR! Please include the following file with any support request:
npm ERR! D:\Web\dierechnungstimmt\npm-debug.log
and
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.1","npm":"2.5.1"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.1","npm":"2.5.1"})
npm ERR! fetch failed https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/gaze/-/gaze-0.5.1.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/through2/-/through2-0.6.3.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/clone/-/clone-0.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
npm ERR! fetch failed https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
C:\Users\Basti\AppData\Roaming\npm\cordova -> C:\Users\Basti\AppData\Roaming\npm\node_modules\cordova\bin\cordova
npm ERR! fetch failed https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: read ECONNRESET
C:\Users\Basti\AppData\Roaming\npm\ionic -> C:\Users\Basti\AppData\Roaming\npm\node_modules\ionic\bin\ionic
[email protected] C:\Users\Basti\AppData\Roaming\npm\node_modules\i
[email protected] C:\Users\Basti\AppData\Roaming\npm\node_modules\cordova
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected] ([email protected])
ÔööÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[email protected] C:\Users\Basti\AppData\Roaming\npm\node_modules\ionic
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected] ([email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
Ôö£ÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
ÔööÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Can anyone please help me?
EDIT: Tried to downgrade to node 0.10 an run cmd as administrator, but it still doesn't work:
C:\Users\Basti\Desktop>npm install i -g cordova
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.10.38","npm":"2.7.4"})
npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tree
C:\Program Files (x86)\nodejs\cordova -> C:\Program Files (x86)\nodejs\node_modules\cordova\bin\cordova
[email protected] C:\Program Files (x86)\nodejs\node_modules\i
[email protected] C:\Program Files (x86)\nodejs\node_modules\cordova
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected]
Ôö£ÔöÇÔöÇ [email protected] ([email protected])
ÔööÔöÇÔöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Upvotes: 22
Views: 84154
Reputation: 2139
For me, it worked by turning off Windows Defender and then running the following commands (run CMD as an admin).
First, take note of the config default values via npm config ls -l
.
Next:
npm config set registry http://registry.npmjs.org/
I have slow internet connection so these are needed:
npm fetch-retry-maxtimeout 360000
npm fetch-retry-mintimeout 60000
Clean cache:
npm cache clean --force
Once that is done, I ran npm install --legacy-peer-deps
. then reverted all my configs to the default values.
Don't forget to turn back Windows Defender on.
Upvotes: 0
Reputation: 1
guys I just came across this problem and solved it by:
npm config edit
then clear out you're .npmrc file,
save it afterwards just try out creating your react-app,
happy-hacking!
Upvotes: 0
Reputation: 17
That is work for me:
npm cache clean --force
After clear your cache, run this command :
npm config set registry http://registry.npmjs.org/
And npm install
Upvotes: 0
Reputation: 1433
I had a similar issue with jdbc package installation. I was also behind a proxy. I used a force install and it worked.
npm i jdbc --force
Note: Make sure you know the consequences of --force install by checking the documentation.
Upvotes: 0
Reputation: 1357
If you are in corpnet with a proxy and none of the provided solutions worked for you, most probably you`ll need to provide your proxy with your credentials, something like this:
npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port
This took a lot of time from me today, hopefully this post will save some of yours.
Upvotes: 0
Reputation: 47
I had the same issue while installing the expo-cli in Windows 8.1, but it resolved after i have followed the below steps.
run below command in your command prompt.
npm config edit
.npmrc file will open in your default editor.
Now remove the lines having proxy, https-proxy, registery and save that file.
After that i was able to install the expo-cli package without the proxy issue.
Upvotes: 0
Reputation: 3
The best discussion of the ECONNRESET
issue is in this npm registry ticket:
https://github.com/npm/registry-issue-archive/issues/10
tl;dr: If you are seeing this frequently, it may be a "too many simultaneous connections" issue that can be addressed by updating your version of npm to 2.15.x
or 3.x / latest
.
One comment (no rep to comment directly) on posts by Shokatsuryō-san & Sunil: both recommend changing your npm registry config to use http over https. Doing so can present a significant security risk in production environments; don't use that fix in those cases.
Upvotes: 0
Reputation: 809
Well, actually, I want to give a comment to your question. Because I have low reputation, it means I can't give a.
If you have a trouble with npm
on Windows. I would suggest you take a look the common errors of npm
on wiki here. Back to your problem, please make sure you are using internet connection along with proxy or not. If you are using it, please do command npm config set proxy
. I found same problem on Stackoverflow and the solution is:
use
npm config set registry http://registry.npmjs.org/
so that npm requests for
http
url instead ofhttps
.and then try the same
npm install
command.
Don't forget to clear your cache by doing npm cache clean
.
Although, this way can solve the problem. You should consider about the security. This way is not the safe way because it can lead to security problem since https
is not used here. I don't recommend to use this on production (thanks @ivarni for pointing this out).
Upvotes: 47
Reputation: 21
I was got a similar issue.
I was run below commands
npm config edit
Open that file and remove line no approx 8 proxy=http://github.com/ registry=http://registry.npmjs.org/ those are user custom settings remove this file and save it.
After run below command npm install should be work fine.
Upvotes: 2
Reputation: 462
I actually had the same problem, from my workplace I could install everything fine, but it wasn't working from home. I found out that the custom DNS I set up on my routeur was the problem, I have reverted to the default internet provider one and everything works fine.
Upvotes: 0
Reputation: 478
Had the similar issue on Windows 10 with Node v5.0.0
Another solution from here that works for me:
Try to unistall x64 version of Node.js and install x86 one.
Upvotes: 0
Reputation: 9481
The following worked for me
npm config set registry http://registry.npmjs.org/
npm install -g cordova
npm install -g ionic
Upvotes: 5