Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

varundavda's avatar

NPM INSTALL ETIMED OUT ERROR

I have been facing this issue all day long, and i finally give up and would request help of some experts out here. When i run a command 'npm install' from the root of the directory of my laravel project using 'cmd' ,on windows 7 , xampp, with firewall turned off , no anti-virus software, and not using any proxy server for sure, i always get this error.


C:\xampp\htdocs\gulp_test>npm install npm ERR! Windows_NT 6.1.7600 npm ERR! argv "node" "C:\Users\Varun\AppData\Roaming\npm\node_modules\npm \bin\npm-cli.js" "install" npm ERR! node v0.12.7 npm ERR! npm v2.13.1 npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT 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 settin gs. 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! C:\xampp\htdocs\gulp_test\npm-debug.log


I only get this error when i run 'npm install' or 'npm install laravel-elixir' but not when i run 'npm install gulp' or 'npm install express'.

Also when i run 'npm install' it installs a folder named node_modules under root directory, but it does not install folder of 'LARAVEL-ELIXIR'.. Could it be because of the above mentioned error??

I have also tried the following options to get GULP working

  1. 'npm cache clean'
  2. Re-install node
  3. Running 'npm install gulp' , 'npm install laravel-elixir' individually, one after another 4)composer update
  4. Connecting my personal hotspot instead of WiFi, in case there would have been some network related issue.

But none of the above worked.

Any suggestions as of what can be done to get 'npm install' function as it should??

0 likes
8 replies
varundavda's avatar

Asked the same question on satckoverflow.com Here , but with no luck there as well..

Please help.

Thanks in advance.

varundavda's avatar

This problem is still unsolved..Any help will be appreciated.. Thanks

varundavda's avatar

Yup i have..Also have tired running 'npm install' using nodejs commnad prompt. But none of them helped.

bashy's avatar

Tried with verbose on? Need to see what it's failing on.

1 like
varundavda's avatar

Thanks alot @bashy for the reply.. I have solved the error.. The problem was with package.json file.. The fresh installation of laravel comes with the below content in package.json.

{

"private": true,

"devDependencies": {

"gulp": "^3.8.8"

},

"dependencies": {

"laravel-elixir": "^2.0.0",

"bootstrap-sass": "^3.0.0"

&nbsp}

}

I changed it to

{

"devDependencies": {

"gulp": "^3.8.8",

"laravel-elixir": "^2.0.0"


}

}

Please or to participate in this conversation.