Can't install anything with npm ECONNRESET without proxy

后端 未结 7 2088
眼角桃花
眼角桃花 2020-12-29 07:31

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

7条回答
  •  萌比男神i
    2020-12-29 08:03

    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 of https.

    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).

提交回复
热议问题