baryshev / look

Performance profiler based on nodetime
MIT License
449 stars 42 forks source link

Installing 'look@0.1.3' fails for NodeJs v4.4.7 LTS and npm v2.15.8 #29

Open samhowes opened 8 years ago

samhowes commented 8 years ago

Reproduction Steps

  1. Install the latest nodeJs LTS package from nodejs.org. Currently v4.4.7 LTS at the time of writing
  2. Create a package.json file with look@0.1.3 as a dependency
    1. See example package.json below
  3. run npm install
    1. if npm install has already been run, rm -rf node_modules/look will allow the issue to be reproduced again
      Example package.json
{
    "name": "test-look",
    "version": "1.0.0",
    "description": "Test the look npm package install on latest node and npm",
    "main": "index.js",
    "author": "",
    "license": "ISC",
    "devDependencies": {
        "look": "0.1.3"
    }
}

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

Output

Dependency graph produced by npm install

look@0.1.3 node_modules/look
├── connect-route@0.1.3
├── clusterhub@0.2.1 (eventvat@0.2.1)
├── connect@2.7.4 (fresh@0.1.0, cookie-signature@0.0.1, pause@0.0.1, buffer-crc32@0.1.1, bytes@0.2.0, cookie@0.0.5, qs@0.5.1, send@0.1.0, formidable@1.0.11)
├── nodetime@0.4.6 (request@2.10.0)
└── socket.io@0.9.14 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.11)

Output from npm install

MacBook-Pro:ng-patterns-testing user$ npm install
npm WARN deprecated nodetime@0.4.6: Nodetime shut down on August 31, 2015. See AppDynamics Node.js Agent http://appdynamics.com/nodejs
|
> timekit@1.0.3 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

> v8tools@0.2.2 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 timekit@1.0.3

> ws@0.4.32 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 v8tools@0.2.2

> AngularJS-Patterns-Testing-Demo@0.0.1 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
look@0.1.3 node_modules/look
├── connect-route@0.1.3
[npm-install.log.txt](https://github.com/baryshev/look/files/414640/npm-install.log.txt)

├── clusterhub@0.2.1 (eventvat@0.2.1)
├── connect@2.7.4 (fresh@0.1.0, cookie-signature@0.0.1, pause@0.0.1, buffer-crc32@0.1.1, bytes@0.2.0, cookie@0.0.5, qs@0.5.1, send@0.1.0, formidable@1.0.11)
├── nodetime@0.4.6 (request@2.10.0)
└── socket.io@0.9.14 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.11)
beige90 commented 7 years ago

Experiencing same problem. Any idea?

vandernorth commented 7 years ago

@Noiwex any alternatives?