lloyd / node-toobusy

Build Node.JS servers that don't fall over.
1.3k stars 128 forks source link

Issue installing with latest node version #50

Open ORESoftware opened 8 years ago

ORESoftware commented 8 years ago

I am having trouble installing toobusy with node version 5.0.0

see error trace below

CACSVML-13295:api amills001c$ sudo npm install --save toobusy

> toobusy@0.2.4 install /Users/amills001c/WebstormProjects/lectal_all/api/node_modules/toobusy
> node-gyp rebuild

  CXX(target) Release/obj.target/toobusy/toobusy.o
../toobusy.cc:25:29: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> TooBusy(const Arguments& args) {
                            ^~~~~~~~~
                            v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:37:20: error: no matching function for call to 'True'
    return block ? True() : False();
                   ^~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:8129:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Boolean> True(Isolate* isolate) {
               ^
../toobusy.cc:37:29: error: no matching function for call to 'False'
    return block ? True() : False();
                            ^~~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:8138:16: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<Boolean> False(Isolate* isolate) {
               ^
../toobusy.cc:40:30: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> ShutDown(const Arguments& args) {
                             ^~~~~~~~~
                             v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:45:12: error: no matching function for call to 'Undefined'
    return Undefined();
           ^~~~~~~~~
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:315:27: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
  friend Local<Primitive> Undefined(Isolate* isolate);
                          ^
../toobusy.cc:48:25: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> Lag(const Arguments& args) {
                        ^~~~~~~~~
                        v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:49:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:50:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Integer::New(s_currentLag));
           ~~~~~ ^
../toobusy.cc:50:49: error: too few arguments to function call, expected 2, have 1
    return scope.Close(Integer::New(s_currentLag));
                       ~~~~~~~~~~~~             ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:2496:3: note: 'New' declared here
  static Local<Integer> New(Isolate* isolate, int32_t value);
  ^
../toobusy.cc:53:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> HighWaterMark(const Arguments& args) {
                                  ^~~~~~~~~
                                  v8::internal::Arguments
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../toobusy.cc:54:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../toobusy.cc:56:13: error: member access into incomplete type 'const v8::internal::Arguments'
    if (args.Length() >= 1) {
            ^
/Users/amills001c/.node-gyp/5.0.0/include/node/v8.h:139:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../toobusy.cc:57:18: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        if (!args[0]->IsNumber()) {
             ~~~~^~
../toobusy.cc:58:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:60:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("expected numeric first argument")));
                    ~~~~~~~~~~~~^
../toobusy.cc:62:23: error: type 'const v8::internal::Arguments' does not provide a subscript operator
        int hwm = args[0]->Int32Value();
                  ~~~~^~
../toobusy.cc:64:24: error: no member named 'ThrowException' in namespace 'v8'
            return v8::ThrowException(
                   ~~~~^
../toobusy.cc:66:33: error: no member named 'New' in 'v8::String'
                    v8::String::New("maximum lag should be greater than 10ms")));
                    ~~~~~~~~~~~~^
../toobusy.cc:71:18: error: no member named 'Close' in 'v8::HandleScope'
    return scope.Close(Number::New(HIGH_WATER_MARK_MS));
           ~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/toobusy/toobusy.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 13.4.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/amills001c/WebstormProjects/lectal_all/api/node_modules/toobusy
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Darwin 13.4.0
npm ERR! argv "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/bin/npm" "install" "--save" "toobusy"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.9
npm ERR! code ELIFECYCLE

npm ERR! toobusy@0.2.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the toobusy@0.2.4 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the toobusy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls toobusy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/amills001c/WebstormProjects/lectal_all/api/npm-debug.log
CACSVML-13295:api amills001c$ 

is there something I can do to fix this? thanks

asilvas commented 8 years ago

https://github.com/lloyd/node-toobusy/issues/42#issuecomment-73875716

wirespecter commented 8 years ago

I have the exact same problem.

MtDalPizzol commented 8 years ago

Same problem here. Doing a little research, seems like there's a dependency that needs to be updated... just a guess...

OmgImAlexis commented 8 years ago

Using npm 3.5.2 and node v5.0.0 it installs perfectly.

amazing-gao commented 8 years ago

I have some problem. node v4.3.1

pimterry commented 8 years ago

Fails for me with npm v3.8.3 and node v5.1.0.

codinronan commented 7 years ago

Just leaving this here, this repo is apparently no longer maintained and a maintained fork exists here:

https://github.com/STRML/node-toobusy

Solves my problem and works great.