ng-patterns-testing icon indicating copy to clipboard operation
ng-patterns-testing copied to clipboard

Npm install fails NodeJs v4.4.7 LTS and npm v2.15.8

Open samhowes opened this issue 8 years ago • 0 comments

Installing '[email protected]' fails for NodeJs v4.4.7 LTS and npm v2.15.8

Reproduction Steps

  1. Install the latest nodeJs LTS package from nodejs.org. Currently v4.4.7 LTS at the time of writing
    1. Running npm install -g npm may be required after installing, likely not though
  2. run npm install
    1. if npm install has already been run, rm -rf node_modules/look will allow the issue to be reproduced again

Result: Error installing the package 'look' due to node-gyp compile issues with nodetime and timekit

Cause: The package look depends on the package nodetime which has been discontinued since August 31, 2015 and replaced by appdynamics. Nodetime is compiled by node-gyp, and currently fails to compile

Environments: Mac OSX El Capitan 10.11.6 (15G31), Windows 10 Version 1511

Issue also submitted to look issues as issue #29

Details

I have been trying to use this with my team, who have fresh installs of node, and they are getting errors when running npm install. I had an older version of node installed on my machine, and it installed just fine. After upgrading to the latest node version though, installing npm look failed the npm install

Currently nodetime fails to compile with node-gyp (see npm install log below)

P.s. This repo has been really helpful for providing a kick start into JS Tooling and running test, thanks for all the work in putting this together - very helpful for a newbie to JS Tooling and JS Test runners.

Output

Dependency graph produced by npm install

[email protected] node_modules/look
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

Output from npm install

This was customized: I installed all packages, then did rm -rf node_modules/look followed by npm install to specifically reproduce this issue.

Output is from Mac OSX El Capitan 10.11.6 (15G31)

MacBook-Pro:ng-patterns-testing user$ npm install
npm WARN deprecated [email protected]: Nodetime shut down on August 31, 2015. See AppDynamics Node.js Agent http://appdynamics.com/nodejs
|
> [email protected] install /Users/user/dev/repos/ng-patterns-testing/node_modules/look/node_modules/nodetime/node_modules/timekit
> node-gyp rebuild

module.js:327
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at [eval]:1:1
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:409:26)
    at node.js:579:27
    at nextTickCallbackWith0Args (node.js:420:9)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
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 15.6.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 /Users/user/dev/repos/ng-patterns-testing/node_modules/look/node_modules/nodetime/node_modules/timekit
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

> [email protected] install /Users/user/dev/repos/ng-patterns-testing/node_modules/look/node_modules/nodetime/node_modules/v8tools
> node-gyp rebuild

  CXX(target) Release/obj.target/v8tools/src/v8tools.o
In file included from ../src/v8tools.cc:6:
../src/gc.h:11:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> AfterGC(const Arguments& args);
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/user/.node-gyp/4.4.7/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/v8tools.cc:7:
../src/profiler.h:9:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> StartV8Profiler(const Arguments& args);
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/user/.node-gyp/4.4.7/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/v8tools.cc:7:
../src/profiler.h:10:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> StopV8Profiler(const Arguments& args);
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/user/.node-gyp/4.4.7/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/v8tools.cc:7:
../src/profiler.h:11:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> TakeHeapSnapshot(const Arguments& args);
                                     ^~~~~~~~~
                                     v8::internal::Arguments
/Users/user/.node-gyp/4.4.7/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/v8tools.cc:13:67: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handle<v8::Value>
      (const v8::internal::Arguments &)' (aka 'v8::Local<v8::Value> (const v8::internal::Arguments &)')
  target->Set(String::NewSymbol("afterGC"), FunctionTemplate::New(AfterGC)->GetFunction());
                                                                  ^~~~~~~
/Users/user/.node-gyp/4.4.7/include/node/v8.h:4350:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/v8tools.cc:13:23: error: no member named 'NewSymbol' in 'v8::String'
  target->Set(String::NewSymbol("afterGC"), FunctionTemplate::New(AfterGC)->GetFunction());
              ~~~~~~~~^
../src/v8tools.cc:14:75: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handle<v8::Value>
      (const v8::internal::Arguments &)' (aka 'v8::Local<v8::Value> (const v8::internal::Arguments &)')
  target->Set(String::NewSymbol("startV8Profiler"), FunctionTemplate::New(StartV8Profiler)->GetFunction());
                                                                          ^~~~~~~~~~~~~~~
/Users/user/.node-gyp/4.4.7/include/node/v8.h:4350:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/v8tools.cc:14:23: error: no member named 'NewSymbol' in 'v8::String'
  target->Set(String::NewSymbol("startV8Profiler"), FunctionTemplate::New(StartV8Profiler)->GetFunction());
              ~~~~~~~~^
../src/v8tools.cc:15:74: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handle<v8::Value>
      (const v8::internal::Arguments &)' (aka 'v8::Local<v8::Value> (const v8::internal::Arguments &)')
  target->Set(String::NewSymbol("stopV8Profiler"), FunctionTemplate::New(StopV8Profiler)->GetFunction());
                                                                         ^~~~~~~~~~~~~~
/Users/user/.node-gyp/4.4.7/include/node/v8.h:4350:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/v8tools.cc:15:23: error: no member named 'NewSymbol' in 'v8::String'
  target->Set(String::NewSymbol("stopV8Profiler"), FunctionTemplate::New(StopV8Profiler)->GetFunction());
              ~~~~~~~~^
../src/v8tools.cc:16:76: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'Handle<v8::Value>
      (const v8::internal::Arguments &)' (aka 'v8::Local<v8::Value> (const v8::internal::Arguments &)')
  target->Set(String::NewSymbol("takeHeapSnapshot"), FunctionTemplate::New(TakeHeapSnapshot)->GetFunction());
                                                                           ^~~~~~~~~~~~~~~~
/Users/user/.node-gyp/4.4.7/include/node/v8.h:4350:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate, FunctionCallback callback = 0,
               ^
../src/v8tools.cc:16:23: error: no member named 'NewSymbol' in 'v8::String'
  target->Set(String::NewSymbol("takeHeapSnapshot"), FunctionTemplate::New(TakeHeapSnapshot)->GetFunction());
              ~~~~~~~~^
12 errors generated.
make: *** [Release/obj.target/v8tools/src/v8tools.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:276: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 15.6.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 /Users/user/dev/repos/ng-patterns-testing/node_modules/look/node_modules/nodetime/node_modules/v8tools
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /Users/user/dev/repos/ng-patterns-testing/node_modules/look/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /Users/user/dev/repos/ng-patterns-testing
> bower install

bower                     invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes
[email protected] node_modules/look
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

samhowes avatar Aug 12 '16 05:08 samhowes