I'm trying to install npm to use vue.js in my laravel project but I get this error when I run the command npm install
:
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/lodash failed, reason: connect ETIMEDOUT 151.101.4.162:443
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! C:\Users\alberto89\AppData\Roaming\npm-cache\_logs\2018-04-17T20_25_48_205Z-debug.log
I am using node version: v9.11.1
and npm version: 5.6.0
. Dear colleagues, it can happen.
If you are using a proxy to connect to the Internet, you have to configure npm to recognize that proxy.
Open a console and enter the following command:
Where proxy_domain can be 10.254.45.1 or proxy.serv.cu port is the port number through which the proxy server is running
Since your computer connects through a proxy and it seems to be the only way to connect, you'll need to modify your npm settings . To do this you must execute the following commands:
Where:
The username or password may not be necessary, depending on the proxy settings, in which case they would be the same commands without the part
<user>:<pass>@
. I hope I've helped.