0

Hello I am working on a project where I have to build an API. With node.js, express, and Mongodb.

When I install the dependencies of express or mongo db ( exemple :npm install express), I have a error.

I work with my wifi, yesterday everything was working though. I don't understand why I have this problem now. I must make configuration ? I shared an image.

I work with visual studio code. 1

3 Answers3

0

check Node: npm install failure due to proxy config! What now?

and try

npm config set proxy

npm config set registry "http://registry.npmjs.org/"

0

As it is stated in the error description,
"there is a problem related to network connectivity".

Probably, it's the problem with your wifi connection.

Command "npm install express" should work just fine with normal connection.

0

Solution: The proxy you are using must be configured in npm.

npm config set proxy http://your url

npm config set https-proxy http://your url

If you don't know the proxy url, you can get it through the registry, run in cmd:

regquery "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | find /i "proxyserver"
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
Zest Zhang
  • 41
  • 4