npm install etimed out error

I have been facing this issue all day long, so I decided to get help from some experts out here. When I run a command npm install from the root of the directory of my laravel project using cmd with following config..

1. Windows 7 64-bit
2. xampp
3. Firewall turned off
4. No anti-virus software
5. Not using any proxy server for sure (Have checked it)

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 settings.
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.lognetwork npm ERR!network npm ERR!

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. When I run npm install it installs a folder named node_modules under root directory, but it does not install folder LARAVEL-ELIXIR. Could it be because of the above mentioned error?

I have also tried the following options to get GULP working

  • npm cache clean

  • Re-install node

  • Running npm install gulp , npm install laravel-elixir individually one after another

  • composer update

  • Connecting my personal hotspot instead of WiFi, in case there would have been some network related issue.

  • Tried almost every suggestion on stackoverflow and google.

But none of the above worked.

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

I have finally managed to get rid of the error. It had to do something with package.json file. After a fresh installation of laravel 5 the content of package.json were as below.

{
  "private": true,
  "devDependencies": 
     {
       "gulp": "^3.8.8"
     },
  "dependencies": 
  {
    "laravel-elixir": "^2.0.0",
    "bootstrap-sass": "^3.0.0"
  }
}

I changed the content to below and it worked.

{
  "devDependencies": 
 {
    "gulp": "^3.8.8",
    "bootstrap-sass": "^3.0.0",
    "laravel-elixir": "^2.0.0"
  }
}