gruntjs / grunt-cli

Grunt's command line interface.
http://gruntjs.com/
MIT License
706 stars 248 forks source link

Cannot install on node 8.4.0, node-pre-gyp 404 erorr #115

Closed nathanjd closed 7 years ago

nathanjd commented 7 years ago

Currently I have to downgrade to node 6.x to successfully install grunt-cli. Install always fails for node 8.x. Logs below:

$ node -v v8.4.0

$ npm -v 5.3.0

OS X El Capitan 10.11.3 (15D21)

$ npm install --save-dev grunt-cli@latest
WARN extract-stream excluding symbolic link index.js -> lib/sass.js1.3.1
WARN extract-stream excluding symbolic link lib/index.js -> sass.js

> v8-profiler@5.6.5 preinstall /Users/q4i2/Projects/moovweb/node_modules/v8-profiler
> node -e 'process.exit(0)'

> v8-debug@0.7.7 preinstall /Users/q4i2/Projects/moovweb/node_modules/v8-debug
> node -e 'process.exit(0)'

> v8-debug@0.7.7 install /Users/q4i2/Projects/moovweb/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v57-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@0.7.7 and node@8.4.0 (node-v57 ABI) (falling back to source compile with node-gyp) 
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/debug/src/debug.o
../src/debug.cc:38:20: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        v8::Debug::Call(fn);
                   ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:193:42: note: 'Call' has been explicitly marked deprecated here
                static MaybeLocal<Value> Call(
                                         ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:38:27: error: too few arguments to function call, expected at least 2, have 1
        v8::Debug::Call(fn);
        ~~~~~~~~~~~~~~~   ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:193:17: note: 'Call' declared here
                static MaybeLocal<Value> Call(
                ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:46:61: error: too few arguments to function call, single argument 'isolate' was not specified
        Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate();
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:17: note: 'GetDebugContext' declared here
                static Local<Context> GetDebugContext(Isolate* isolate));
                ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:46:45: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
        Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate();
                                            ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:39: note: 'GetDebugContext' has been explicitly marked deprecated here
                static Local<Context> GetDebugContext(Isolate* isolate));
                                      ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:48:20: warning: 'SendCommand' is deprecated [-Wdeprecated-declarations]
        v8::Debug::SendCommand(debug_isolate, *command, command.length());
                   ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:170:29: note: 'SendCommand' has been explicitly marked deprecated here
                static void SendCommand(Isolate* isolate,
                            ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:61:67: error: too few arguments to function call, single argument 'isolate' was not specified
        Local<Context> debug_context = v8::Debug::GetDebugContext();
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:17: note: 'GetDebugContext' declared here
                static Local<Context> GetDebugContext(Isolate* isolate));
                ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:61:51: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
        Local<Context> debug_context = v8::Debug::GetDebugContext();
                                                  ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:39: note: 'GetDebugContext' has been explicitly marked deprecated here
                static Local<Context> GetDebugContext(Isolate* isolate));
                                      ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:65:22: error: no member named 'GetMirror' in 'v8::Debug'
          v8::Debug::GetMirror(info.GetIsolate()->GetCurrentContext(), info[0]);
          ~~~~~~~~~~~^
../src/debug.cc:66:38: warning: 'GetDebugContext' is deprecated [-Wdeprecated-declarations]
          debug_context = v8::Debug::GetDebugContext();
                                     ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:39: note: 'GetDebugContext' has been explicitly marked deprecated here
                static Local<Context> GetDebugContext(Isolate* isolate));
                                      ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
../src/debug.cc:66:54: error: too few arguments to function call, single argument 'isolate' was not specified
          debug_context = v8::Debug::GetDebugContext();
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8-debug.h:209:17: note: 'GetDebugContext' declared here
                static Local<Context> GetDebugContext(Isolate* isolate));
                ^
/Users/q4i2/.node-gyp/8.4.0/include/node/v8config.h:332:3: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
  ^
5 warnings and 5 errors generated.
make: *** [Release/obj.target/debug/src/debug.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/q4i2/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/Users/q4i2/.nvm/versions/node/v8.4.0/bin/node" "/Users/q4i2/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64/debug.node" "--module_name=debug" "--module_path=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64"
gyp ERR! cwd /Users/q4i2/Projects/moovweb/node_modules/v8-debug
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/q4i2/.nvm/versions/node/v8.4.0/bin/node /Users/q4i2/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64/debug.node --module_name=debug --module_path=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/q4i2/Projects/moovweb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 15.3.0
node-pre-gyp ERR! command "/Users/q4i2/.nvm/versions/node/v8.4.0/bin/node" "/Users/q4i2/Projects/moovweb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/q4i2/Projects/moovweb/node_modules/v8-debug
node-pre-gyp ERR! node -v v8.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok 
Failed to execute '/Users/q4i2/.nvm/versions/node/v8.4.0/bin/node /Users/q4i2/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64/debug.node --module_name=debug --module_path=/Users/q4i2/Projects/moovweb/node_modules/v8-debug/build/debug/v0.7.7/node-v57-darwin-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug@0.7.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the v8-debug@0.7.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/q4i2/.npm/_logs/2017-08-23T18_42_40_604Z-debug.log
shama commented 7 years ago

This error appears to be caused by the module v8-debug possibly not being compatible with that version of node. grunt-cli doesn't use native addons so check your package.json install script or try installing grunt-cli from another folder.

Also it should be npm install grunt-cli -g to install globally as grunt-cli just gives access to the command grunt to run local grunt projects.

nathanjd commented 7 years ago

Ahh whoops, thanks for pointing that out. Didn't realize that a package install could be affected by siblings. I tried it in a fresh directory and the install was successful.

q4i2@M00973344 ~/Projects/scratch/grunt-test 
$ npm install grunt-cli@latest
npm WARN saveError ENOENT: no such file or directory, open '/Users/q4i2/Projects/scratch/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/q4i2/Projects/scratch/package.json'
npm WARN scratch No description
npm WARN scratch No repository field.
npm WARN scratch No README data
npm WARN scratch No license field.

+ grunt-cli@1.2.0
updated 1 package in 2.412s

Thank you.