generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

npm install getting stuck

Open DaftMonk opened this issue 12 years ago • 20 comments

Just thought I'd post this here in case anyone else is experiencing this. npm install seems to be getting stuck for me sometimes:

> [email protected] postinstall C:\Users\Tyler\JSworkspace\finaltest\node_modules\g
runt-contrib-imagemin\node_modules\gifsicle
> node lib/check.js

  gifsicle.exe: downloading [===================] 100% 0.0s


√ pre-build test passed successfully

> [email protected] postinstall C:\Users\Tyler\JSworkspace\finaltest\node_module
s\grunt-contrib-imagemin\node_modules\optipng-bin
> node lib/check.js

  optipng.exe: downloading [===================] 100% 0.0s


√ pre-build test passed successfully

Hangs at the last line. If i end the process and try running grunt serve/build/test, they all work, but it's annoying that its not exiting cleanly. I don't know which dependency is causing this, but it might be a windows only problem.

DaftMonk avatar Jan 16 '14 19:01 DaftMonk

Nope, it`s not windows only, I think I've experienced that at least once on ubuntu, but I was sure it was just my vm going weird...

kjellski avatar Jan 16 '14 21:01 kjellski

Another place it sometimes hangs is on this:

C:\Users\Tyler\.node-gyp\0.10.24\deps\v8\include\v8.h(179): warning C4506: no d
    efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Han
    dle<T>)' [C:\Users\Tyler\JSworkspace\imagemin2\node_modules\karma\node_modules\
    socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxpro
    j]
              with
              [
                  T=v8::Object
              ]
         Creating library C:\Users\Tyler\JSworkspace\imagemin2\node_modules\karma\n
      ode_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Rel
      ease\validation.lib and object C:\Users\Tyler\JSworkspace\imagemin2\node_modu
      les\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\w
      s\build\Release\validation.exp
      Generating code
      Finished generating code
      validation.vcxproj -> C:\Users\Tyler\JSworkspace\imagemin2\node_modules\karma
      \node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\R
      elease\\validation.node

It's hard to test against because it doesn't happen all the time.

DaftMonk avatar Jan 16 '14 21:01 DaftMonk

For that first error, can you try scrolling all the way up in the logs looking for hung bower instances? Before we switched to hard-coded versions of Angular, Bower would prompt in the middle of the install asking which version of Angular we wanted to use. Since bower and npm ran concurrently, the bower prompt was getting swallowed up by the npm install logs. If you were to press enter, it should have re-prompted.

eddiemonge avatar Jan 27 '14 21:01 eddiemonge

@eddiemonge Good point. I'll look out for that next time I run into this problem.

DaftMonk avatar Jan 27 '14 21:01 DaftMonk

I was running into this problem too. Narrowed it down to mongoose and jpegtran-bin. I set those two dependencies to "latest" in package.json and npm install worked for me after that.

mrob11 avatar Feb 04 '14 01:02 mrob11

@mike360 Good to know. What OS are you running?

DaftMonk avatar Feb 04 '14 01:02 DaftMonk

@DaftMonk OS X 10.9.1. node v0.10.25. npm 1.3.24.

mrob11 avatar Feb 04 '14 13:02 mrob11

@mike360 Thanks!

DaftMonk avatar Feb 04 '14 13:02 DaftMonk

@DaftMonk FWIW A lot of Yeoman generators (or, more specifically npm) have been screwing up for me lately so take this with a grain of salt.

mrob11 avatar Feb 04 '14 13:02 mrob11

I noticed this today as well. Hadn't used the generator for a few months and came back to it yesterday - npm just hangs every time. I sometimes get Error: shasum check failed for various modules (different modules each time), sometimes I get Error: connect ETIMEDOUT for phantomjs, and if all seems to go well it just hangs when it gets to √ pre-build test passed successfully. Using latest stable versions of node and npm, 0.10.26 and 1.4.6 respectively. Very frustrating :(

snowman-repos avatar Mar 25 '14 03:03 snowman-repos

@darryl-snow I think its the imagemin package thats causing the problems, it's a very finicky package. It gives me so much trouble I'd consider making it optional, however I'm worried about bloating the options too much, maybe there's some way to improve the interface for adding more options.

DaftMonk avatar Mar 29 '14 06:03 DaftMonk

I've had various issues with imagemin too. Currently I'm getting this each time I try and run grunt serve:

Loading "imagemin.js" tasks...ERROR Error: Cannot find module 'cache-file'

captDaylight avatar Mar 31 '14 21:03 captDaylight

"grunt-contrib-imagemin": "latest" in my package.json fixed the hanging and other misc errors

timelf123 avatar Apr 01 '14 19:04 timelf123

i am getting this error in installation screenshot from 2014-07-29 22 57 14

Nirajkashyap avatar Jul 29 '14 17:07 Nirajkashyap

@Nirajkashyap can you show us outputs of:

$ yo --version

meeDamian avatar Jul 29 '14 20:07 meeDamian

@Nirajkashyap You need to run npm update -g yo

DaftMonk avatar Jul 30 '14 02:07 DaftMonk

screenshot from 2014-07-30 10 22 19

now updating yo version by : screenshot from 2014-07-30 10 26 05

got this error screenshot from 2014-07-30 10 44 25

and yo version is also not get updated node version : node -v v0.10.25

npm version : npm -v 1.3.24

i have also cleared the cache for npm by: "npm cache clean"

Nirajkashyap avatar Jul 30 '14 05:07 Nirajkashyap

Maybe try reinstalling with npm uninstall -g yo and then npm install -g yo

DaftMonk avatar Jul 30 '14 05:07 DaftMonk

@Nirajkashyap, what is the npm version? Because you're seeing yo 1.1.2 as the latest, but it should be 1.2.x.

I'd try to update npm with npm update -g npm and then reinstall yo with npm install -g yo

Let us know. ;)

dapids avatar Jul 30 '14 06:07 dapids

Hey! @dapids and @DaftMonk thanks. issue is solved. npm version was old.

:) thanks

Nirajkashyap avatar Aug 01 '14 05:08 Nirajkashyap