aslansky / css-sprite

css sprite generator
MIT License
733 stars 59 forks source link

Cannot install on node 4.1.0 #73

Open ChristalYunSun opened 9 years ago

ChristalYunSun commented 9 years ago

> lwip@0.0.6 install ../node_modules/css-sprite/node_modules/lwip > node-gyp rebuild   CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o In file included from ../src/decoder/init.cpp:1: In file included from ../src/decoder/decoder.h:13: ../node_modules/nan/nan.h:120:25: error: redefinition of '_NanEnsureLocal' NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {

../node_modules/nan/nan.h:115:25: note: previous definition is here NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {

../node_modules/nan/nan.h:207:68: error: too many arguments to function call, expected at most 2, have 4 return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);

/Users/Christal/.node-gyp/4.1.0/include/node/v8.h:4675:3: note: 'New' declared here static Local New(

...

16 errors generated. make: *\ [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 14.5.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/var/www/wdwd.com/wdwd/myshop/node_modules/css-sprite/node_modules/lwip gyp ERR! node -v v4.1.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Darwin 14.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "css-sprite" npm ERR! node v4.1.0 npm ERR! npm v2.14.3 npm ERR! code ELIFECYCLE

justinyueh commented 9 years ago

so do I get this error when update to Node 4.0

Avien commented 9 years ago

Me too

ghost commented 8 years ago

It's the lwip, the dependency's version doesn't work with node >4.0... Possible solution:

  1. Download css-sprite: git clone https://github.com/aslansky/css-sprite.git ~/dev/css-sprite
  2. Open package.json and change the lwip dependency version from 0.0.6 to 0.0.8
  3. within your project's folder: npm install ~/dev/css-sprite

Voilà :dancer:

aboutqx commented 7 years ago

@rokiCode not work with node6.9.5