lloyd / node-memwatch

A NodeJS library to keep an eye on your memory usage, and discover and isolate leaks.
2.51k stars 301 forks source link

can't install #67

Open jimmywarting opened 9 years ago

jimmywarting commented 9 years ago
npm install memwatch --save-dev
/
> memwatch@0.2.2 install /Users/kalle/node_modules/memwatch
> node-gyp rebuild

  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:5:
../src/heapdiff.hh:14:35: error: expected class name
    class HeapDiff : public node::ObjectWrap
                                  ^
../src/heapdiff.hh:19:49: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> New( const v8::Arguments& args );
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
In file included from ../src/heapdiff.cc:5:
../src/heapdiff.hh:20:49: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
        static v8::Handle<v8::Value> End( const v8::Arguments& args );
                                                ^~~~~~~~~~~~~
                                                v8::internal::Arguments
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/heapdiff.cc:30:34: error: member initializer 'ObjectWrap' does not name a non-static data member or base class
heapdiff::HeapDiff::HeapDiff() : ObjectWrap(), before(NULL), after(NULL),
                                 ^~~~~~~~~~~~
../src/heapdiff.cc:51:21: error: calling a protected constructor of class 'v8::HandleScope'
    v8::HandleScope scope;
                    ^
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/heapdiff.cc:52:67: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'v8::Handle<v8::Value> (const v8::internal::Arguments &)'
    v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
                                                                  ^~~
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:3456:16: note: passing argument to parameter 'isolate' here
      Isolate* isolate,
               ^
../src/heapdiff.cc:54:29: error: no member named 'NewSymbol' in 'v8::String'
    t->SetClassName(String::NewSymbol("HeapDiff"));
                    ~~~~~~~~^
../src/heapdiff.cc:56:41: error: cannot initialize a parameter of type 'v8::FunctionCallback' (aka 'void (*)(const FunctionCallbackInfo<v8::Value> &)') with an lvalue of type
      'v8::Handle<v8::Value> (const v8::internal::Arguments &)': type mismatch at 1st parameter ('const FunctionCallbackInfo<v8::Value> &' vs 'const v8::internal::Arguments &')
    NODE_SET_PROTOTYPE_METHOD(t, "end", End);
                                        ^~~
/Users/jimmywarting/.node-gyp/0.12.7/src/node.h:246:60: note: passing argument to parameter 'callback' here
                                      v8::FunctionCallback callback) {
                                                           ^
../src/heapdiff.cc:58:29: error: no member named 'NewSymbol' in 'v8::String'
    target->Set(v8::String::NewSymbol( "HeapDiff"), t->GetFunction());
                ~~~~~~~~~~~~^
../src/heapdiff.cc:62:32: error: no type named 'Arguments' in namespace 'v8'; did you mean 'v8::internal::Arguments'?
heapdiff::HeapDiff::New (const v8::Arguments& args)
                               ^~~~~~~~~~~~~
                               v8::internal::Arguments
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/heapdiff.cc:67:14: error: member access into incomplete type 'const v8::internal::Arguments'
    if (!args.IsConstructCall()) {
             ^
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../src/heapdiff.cc:70:17: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
                String::New("Use the new operator to create instances of this object.")));
                ^~~~~~~~~~~
                New
../src/heapdiff.cc:62:21: note: 'New' declared here
heapdiff::HeapDiff::New (const v8::Arguments& args)
                    ^
../src/heapdiff.cc:70:29: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [57]'
                String::New("Use the new operator to create instances of this object.")));
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/heapdiff.cc:62:47: note: passing argument to parameter 'args' here
heapdiff::HeapDiff::New (const v8::Arguments& args)
                                              ^
../src/heapdiff.cc:73:21: error: calling a protected constructor of class 'v8::HandleScope'
    v8::HandleScope scope;
                    ^
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/heapdiff.cc:77:11: error: no member named 'Wrap' in 'heapdiff::HeapDiff'
    self->Wrap(args.This());
    ~~~~  ^
../src/heapdiff.cc:77:20: error: member access into incomplete type 'const v8::internal::Arguments'
    self->Wrap(args.This());
                   ^
/Users/jimmywarting/.node-gyp/0.12.7/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments'
class Arguments;
      ^
../src/heapdiff.cc:82:38: error: no member named 'TakeSnapshot' in 'v8::HeapProfiler'
    self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                   ~~~~~~~~~~~~~~~~~~^
../src/heapdiff.cc:82:51: error: no member named 'New' in 'v8::String'; did you mean simply 'New'?
    self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                                                  ^~~~~~~~~~~~~~~
                                                  New
../src/heapdiff.cc:62:21: note: 'New' declared here
heapdiff::HeapDiff::New (const v8::Arguments& args)
                    ^
../src/heapdiff.cc:82:67: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'const char [1]'
    self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                                                                  ^~
../src/heapdiff.cc:62:47: note: passing argument to parameter 'args' here
heapdiff::HeapDiff::New (const v8::Arguments& args)
                                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/memwatch/src/heapdiff.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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/kalle/node_modules/memwatch
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "memwatch" "--save-dev"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! memwatch@0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the memwatch@0.2.2 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the memwatch 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 memwatch
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/kalle/npm-debug.log
codebykenny commented 9 years ago

+1

MethodGrab commented 9 years ago

This module doesn't support Node 0.12, see https://github.com/lloyd/node-memwatch/issues/62.

monte-hayward commented 9 years ago

+1 for 0.12 support

bogn commented 9 years ago

This looks the same and happens for me with node 0.11.10:

$ npm install
npm http GET https://registry.npmjs.org/memwatch
npm http 200 https://registry.npmjs.org/memwatch
npm http GET https://registry.npmjs.org/memwatch/-/memwatch-0.2.2.tgz
npm http 200 https://registry.npmjs.org/memwatch/-/memwatch-0.2.2.tgz

> memwatch@0.2.2 install /home/bogn/dev/projects/javascript/twitter_streaming_service/node_modules/memwatch
> node-gyp rebuild

make: Verzeichnis »/home/bogn/dev/projects/javascript/twitter_streaming_service/node_modules/memwatch/build« wird betreten
  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In member function ‘void v8::ReturnValue<T>::Set(uint32_t)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:5816:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs]
   typedef internal::Internals I;
                               ^
In file included from ../src/heapdiff.cc:5:0:
../src/heapdiff.hh: At global scope:
../src/heapdiff.hh:15:5: error: expected class-name before ‘{’ token
     {
     ^
../src/heapdiff.hh:19:49: error: ‘Arguments’ in namespace ‘v8’ does not name a type
         static v8::Handle<v8::Value> New( const v8::Arguments& args );
                                                 ^
../src/heapdiff.hh:19:64: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
         static v8::Handle<v8::Value> New( const v8::Arguments& args );
                                                                ^
../src/heapdiff.hh:20:49: error: ‘Arguments’ in namespace ‘v8’ does not name a type
         static v8::Handle<v8::Value> End( const v8::Arguments& args );
                                                 ^
../src/heapdiff.hh:20:64: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
         static v8::Handle<v8::Value> End( const v8::Arguments& args );
                                                                ^
../src/heapdiff.cc: In constructor ‘heapdiff::HeapDiff::HeapDiff()’:
../src/heapdiff.cc:30:34: error: class ‘heapdiff::HeapDiff’ does not have any field named ‘ObjectWrap’
 heapdiff::HeapDiff::HeapDiff() : ObjectWrap(), before(NULL), after(NULL),
                                  ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In static member function ‘static void heapdiff::HeapDiff::Initialize(v8::Handle<v8::Object>)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:51:21: error: within this context
     v8::HandleScope scope;
                     ^
../src/heapdiff.cc:52:70: error: invalid conversion from ‘v8::Handle<v8::Value> (*)(const int&)’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’ [-fpermissive]
     v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(New);
                                                                      ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:3346:34: error:   initializing argument 1 of ‘static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::FunctionCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)’ [-fpermissive]
   static Local<FunctionTemplate> New(
                                  ^
../src/heapdiff.cc:56:44: error: invalid conversion from ‘v8::Handle<v8::Value> (*)(const int&)’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}’ [-fpermissive]
     NODE_SET_PROTOTYPE_METHOD(t, "end", End);
                                            ^
In file included from ../src/heapdiff.hh:10:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/src/node.h:167:13: error:   initializing argument 3 of ‘void node::NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate>, const char*, v8::FunctionCallback)’ [-fpermissive]
 inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv,
             ^
../src/heapdiff.cc: At global scope:
../src/heapdiff.cc:62:32: error: ‘Arguments’ in namespace ‘v8’ does not name a type
 heapdiff::HeapDiff::New (const v8::Arguments& args)
                                ^
../src/heapdiff.cc:62:47: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 heapdiff::HeapDiff::New (const v8::Arguments& args)
                                               ^
../src/heapdiff.cc: In static member function ‘static v8::Handle<v8::Value> heapdiff::HeapDiff::New(const int&)’:
../src/heapdiff.cc:67:15: error: request for member ‘IsConstructCall’ in ‘args’, which is of non-class type ‘const int’
     if (!args.IsConstructCall()) {
               ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:73:21: error: within this context
     v8::HandleScope scope;
                     ^
../src/heapdiff.cc:77:11: error: ‘class heapdiff::HeapDiff’ has no member named ‘Wrap’
     self->Wrap(args.This());
           ^
../src/heapdiff.cc:77:21: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’
     self->Wrap(args.This());
                     ^
../src/heapdiff.cc:82:20: error: ‘TakeSnapshot’ is not a member of ‘v8::HeapProfiler’
     self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                    ^
../src/heapdiff.cc:85:17: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’
     return args.This();
                 ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In function ‘void buildIDSet(std::set<long unsigned int>*, const v8::HeapGraphNode*, int&)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:97:21: error: within this context
     v8::HandleScope scope;
                     ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> changesetToObject(changeset&)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:213:21: error: within this context
     v8::HandleScope scope;
                     ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In function ‘v8::Handle<v8::Value> compare(const v8::HeapSnapshot*, const v8::HeapSnapshot*)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:233:21: error: within this context
     v8::HandleScope scope;
                     ^
../src/heapdiff.cc: At global scope:
../src/heapdiff.cc:301:32: error: ‘Arguments’ does not name a type
 heapdiff::HeapDiff::End( const Arguments& args )
                                ^
../src/heapdiff.cc:301:43: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive]
 heapdiff::HeapDiff::End( const Arguments& args )
                                           ^
In file included from ../src/heapdiff.hh:8:0,
                 from ../src/heapdiff.cc:5:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h: In static member function ‘static v8::Handle<v8::Value> heapdiff::HeapDiff::End(const int&)’:
/home/bogn/.node-gyp/0.11.10/deps/v8/include/v8.h:768:13: error: ‘v8::HandleScope::HandleScope()’ is private
   V8_INLINE HandleScope() {}
             ^
../src/heapdiff.cc:304:21: error: within this context
     v8::HandleScope scope;
                     ^
../src/heapdiff.cc:306:19: error: ‘Unwrap’ was not declared in this scope
     HeapDiff *t = Unwrap<HeapDiff>( args.This() );
                   ^
../src/heapdiff.cc:306:34: error: expected primary-expression before ‘>’ token
     HeapDiff *t = Unwrap<HeapDiff>( args.This() );
                                  ^
../src/heapdiff.cc:306:42: error: request for member ‘This’ in ‘args’, which is of non-class type ‘const int’
     HeapDiff *t = Unwrap<HeapDiff>( args.This() );
                                          ^
../src/heapdiff.cc:320:16: error: ‘TakeSnapshot’ is not a member of ‘v8::HeapProfiler’
     t->after = v8::HeapProfiler::TakeSnapshot(v8::String::New(""));
                ^
../src/heapdiff.cc: In static member function ‘static v8::Handle<v8::Value> heapdiff::HeapDiff::New(const int&)’:
../src/heapdiff.cc:86:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Release/obj.target/memwatch/src/heapdiff.o] Fehler 1
make: Verzeichnis »/home/bogn/dev/projects/javascript/twitter_streaming_service/node_modules/memwatch/build« wird verlassen
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/bogn/.nvm/v0.11.10/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:104:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:862:12)
gyp ERR! System Linux 3.13.0-63-generic
gyp ERR! command "node" "/home/bogn/.nvm/v0.11.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bogn/dev/projects/javascript/twitter_streaming_service/node_modules/memwatch
gyp ERR! node -v v0.11.10
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! memwatch@0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the memwatch@0.2.2 install script.
npm ERR! This is most likely a problem with the memwatch 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 memwatch
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-63-generic
npm ERR! command "/home/bogn/.nvm/v0.11.10/bin/node" "/home/bogn/.nvm/v0.11.10/bin/npm" "install"
npm ERR! cwd /home/bogn/dev/projects/javascript/twitter_streaming_service
npm ERR! node -v v0.11.10
npm ERR! npm -v 1.3.22
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/bogn/dev/projects/javascript/twitter_streaming_service/npm-debug.log
npm ERR! not ok code 0
bogn commented 9 years ago

https://github.com/atom/atom/issues/2478 seems to be related. I also have Ubuntu 14.04.

Using the marcominetti fork with node 0.12.6 (not with the above 0.11.10) worked out. Put this line in package.json:

"memwatch-next": "git://github.com/marcominetti/node-memwatch.git#ae8e23d135e669efa01a99fcc2b07945faea1e6a"
OlgaKozlova commented 9 years ago

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files (x86)\nodejs\node.exe', 1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'memwatch' ] 2 info using npm@2.14.4 3 info using node@v4.1.1 4 verbose install initial load of D:\Projects\appServer\package.json 5 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\async\package.json 6 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\async-q\package.json 7 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\babyparse\package.json 8 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\bluebird\package.json 9 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\body-parser\package.json 10 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\chai\package.json 11 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\express\package.json 12 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\fs-extra\package.json 13 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\fs-extra-promise\package.json 14 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\get-urls\package.json 15 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\is\package.json 16 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\is_js\package.json 17 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\lodash\package.json 18 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\mocha\package.json 19 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\moment\package.json 20 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\parameters-middleware\package.json 21 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\path\package.json 22 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\request\package.json 23 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\request-promise\package.json 24 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\semver\package.json 25 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\should\package.json 26 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\supertest\package.json 27 verbose installManyTop reading scoped package data from D:\Projects\appServer\node_modules\supertest-promised\package.json 28 verbose installManyTop reading scoped package data from D:\Projects\appServer\nodemodules\url-regex\package.json 29 info package.json babyparse@0.4.3 No license field. 30 info package.json path@0.11.14 path is also the name of a node core module. 31 info package.json fs-extra-promise@0.3.0 No license field. 32 verbose readDependencies loading dependencies from D:\Projects\appServer\package.json 33 silly cache add args [ 'memwatch', null ] 34 verbose cache add spec memwatch 35 silly cache add parsed spec Result { 35 silly cache add raw: 'memwatch', 35 silly cache add scope: null, 35 silly cache add name: 'memwatch', 35 silly cache add rawSpec: '', 35 silly cache add spec: '', 35 silly cache add type: 'range' } 36 silly addNamed memwatch@ 37 verbose addNamed "" is a valid semver range for memwatch 38 silly addNameRange { name: 'memwatch', range: '', hasData: false } 39 silly mapToRegistry name memwatch 40 silly mapToRegistry using default registry 41 silly mapToRegistry registry https://registry.npmjs.org/ 42 silly mapToRegistry uri https://registry.npmjs.org/memwatch 43 verbose addNameRange registry:https://registry.npmjs.org/memwatch not in flight; fetching 44 verbose request uri https://registry.npmjs.org/memwatch 45 verbose request no auth needed 46 info attempt registry request try #1 at 6:39:28 PM 47 verbose request id 514b838019323823 48 verbose etag "C8Q1V8U7OWWJL98P5M6PSHNM1" 49 http request GET https://registry.npmjs.org/memwatch 50 http 304 https://registry.npmjs.org/memwatch 51 silly get cb [ 304, 51 silly get { date: 'Tue, 29 Sep 2015 15:39:28 GMT', 51 silly get via: '1.1 varnish', 51 silly get 'cache-control': 'max-age=60', 51 silly get etag: '"C8Q1V8U7OWWJL98P5M6PSHNM1"', 51 silly get age: '0', 51 silly get connection: 'keep-alive', 51 silly get 'x-served-by': 'cache-ord1720-ORD', 51 silly get 'x-cache': 'HIT', 51 silly get 'x-cache-hits': '1', 51 silly get 'x-timer': 'S1443541168.874133,VS0,VE74', 51 silly get vary: 'Accept' } ] 52 verbose etag https://registry.npmjs.org/memwatch from cache 53 verbose get saving memwatch to C:\Users\OlgaKozlova\AppData\Roaming\npm-cache\registry.npmjs.org\memwatch.cache.json 54 silly addNameRange number 2 { name: 'memwatch', range: '', hasData: true } 55 silly addNameRange versions [ 'memwatch', 55 silly addNameRange [ '0.1.0', 55 silly addNameRange '0.1.1', 55 silly addNameRange '0.1.2', 55 silly addNameRange '0.1.3', 55 silly addNameRange '0.1.4', 55 silly addNameRange '0.1.5', 55 silly addNameRange '0.2.0', 55 silly addNameRange '0.2.1', 55 silly addNameRange '0.2.2' ] ] 56 silly addNamed memwatch@0.2.2 57 verbose addNamed "0.2.2" is a plain semver version for memwatch 58 silly cache afterAdd memwatch@0.2.2 59 verbose afterAdd C:\Users\OlgaKozlova\AppData\Roaming\npm-cache\memwatch\0.2.2\package\package.json not in flight; writing 60 verbose afterAdd C:\Users\OlgaKozlova\AppData\Roaming\npm-cache\memwatch\0.2.2\package\package.json written 61 silly install resolved [ { name: 'memwatch', 61 silly install resolved description: 'Keep an eye on your memory usage, and discover and isolate leaks.', 61 silly install resolved version: '0.2.2', 61 silly install resolved author: { name: 'Lloyd Hilaiel', url: 'http://lloyd.io' }, 61 silly install resolved engines: { node: '>= 0.6.0' }, 61 silly install resolved repository: 61 silly install resolved { type: 'git', 61 silly install resolved url: 'git+https://github.com/lloyd/node-memwatch.git' }, 61 silly install resolved main: 'include.js', 61 silly install resolved licenses: [ [Object] ], 61 silly install resolved bugs: { url: 'https://github.com/lloyd/node-memwatch/issues' }, 61 silly install resolved scripts: { install: 'node-gyp rebuild', test: 'mocha tests' }, 61 silly install resolved devDependencies: { mocha: '1.2.2', should: '0.6.3', 'node-gyp': '0.5.7' }, 61 silly install resolved contributors: [ [Object], [Object], [Object] ], 61 silly install resolved readme: 'node-memwatch: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\nBuild Status\n\nnode-memwatch is here to help you detect and find memory leaks in\nNode.JS code. It provides:\n\n- A leak event, emitted when it appears your code is leaking memory.\n\n- A stats event, emitted occasionally, giving you\n data describing your heap usage and trends over time.\n\n- A HeapDiff class that lets you compare the state of your heap between\n two points in time, telling you what has been allocated, and what\n has been released.\n\n\nInstallation\n------------\n\n- npm install memwatch\n\nor\n\n- git clone git://github.com/lloyd/node-memwatch.git\n\n\nDescription\n-----------\n\nThere are a growing number of tools for debugging and profiling memory\nusage in Node.JS applications, but there is still a need for a\nplatform-independent native module that requires no special\ninstrumentation. This module attempts to satisfy that need.\n\nTo get started, import node-memwatch like so:\n\njavascript\nvar memwatch = require(\'memwatch\');\n\n\n### Leak Detection\n\nYou can then subscribe to leak events. A leak event will be\nemitted when your heap usage has increased for five consecutive\ngarbage collections:\n\njavascript\nmemwatch.on(\'leak\', function(info) { ... });\n\n\nThe info object will look something like:\n\njavascript\n{ start: Fri, 29 Jun 2012 14:12:13 GMT,\n end: Fri, 29 Jun 2012 14:12:33 GMT,\n growth: 67984,\n reason: \'heap growth over 5 consecutive GCs (20s) - 11.67 mb/hr\' }\n\n\n\n### Heap Usage\n\nThe best way to evaluate your memory footprint is to look at heap\nusage right aver V8 performs garbage collection. memwatch does\nexactly this - it checks heap usage only after GC to give you a stable\nbaseline of your actual memory usage.\n\nWhen V8 performs a garbage collection (technically, we\'re talking\nabout a full GC with heap compaction), memwatch will emit a stats\nevent.\n\njavascript\nmemwatch.on(\'stats\', function(stats) { ... });\n\n\nThe stats data will look something like this:\n\njavascript\n{\n "num_full_gc": 17,\n "num_inc_gc": 8,\n "heap_compactions": 8,\n "estimated_base": 2592568,\n "current_base": 2592568,\n "min": 2499912,\n "max": 2592568,\n "usage_trend": 0\n}\n\n\nestimated_base and usage_trend are tracked over time. If usage\ntrend is consistently positive, it indicates that your base heap size\nis continuously growing and you might have a leak.\n\nV8 has its own idea of when it\'s best to perform a GC, and under a\nheavy load, it may defer this action for some time. To aid in\nspeedier debugging, memwatch provides a gc() method to force V8 to\ndo a full GC and heap compaction.\n\n\n### Heap Diffing\n\nSo far we have seen how memwatch can aid in leak detection. For\nleak isolation, it provides a HeapDiff class that takes two snapshots\nand computes a diff between them. For example:\n\njavascript\n// Take first snapshot\nvar hd = new memwatch.HeapDiff();\n\n// do some things ...\n\n// Take the second snapshot and compute the diff\nvar diff = hd.end();\n\n\nThe contents of diff will look something like:\n\njavascript\n{\n "before": { "nodes": 11625, "size_bytes": 1869904, "size": "1.78 mb" },\n "after": { "nodes": 21435, "size_bytes": 2119136, "size": "2.02 mb" },\n "change": { "size_bytes": 249232, "size": "243.39 kb", "freed_nodes": 197,\n "allocated_nodes": 10007,\n "details": [\n { "what": "String",\n "size_bytes": -2120, "size": "-2.07 kb", "+": 3, "-": 62\n },\n { "what": "Array",\n "size_bytes": 66687, "size": "65.13 kb", "+": 4, "-": 78\n },\n { "what": "LeakingClass",\n "size_bytes": 239952, "size": "234.33 kb", "+": 9998, "-": 0\n }\n ]\n }\n\n\nThe diff shows that during the sample period, the total number of\nallocated String and Array classes decreased, but Leaking Class\ngrew by 9998 allocations. Hmmm.\n\nYou can use HeapDiff in your on(\'stats\') callback; even though it\ntakes a memory snapshot, which triggers a V8 GC, it will not trigger\nthe stats event itself. Because that would be silly.\n\n\nFuture Work\n-----------\n\nPlease see the Issues to share suggestions and contribute!\n\n\nLicense\n-------\n\nhttp://wtfpl.org\n', 61 silly install resolved readmeFilename: 'README.md', 61 silly install resolved _id: 'memwatch@0.2.2', 61 silly install resolved dist: 61 silly install resolved { shasum: '779e8cd982532b6221b6ed1c1269098bee16f92c', 61 silly install resolved tarball: 'http://registry.npmjs.org/memwatch/-/memwatch-0.2.2.tgz' }, 61 silly install resolved from: 'memwatch@', 61 silly install resolved _npmVersion: '1.2.14', 61 silly install resolved _npmUser: { name: 'lloyd', email: 'lloyd@hilaiel.com' }, 61 silly install resolved maintainers: [ [Object] ], 61 silly install resolved directories: {}, 61 silly install resolved _shasum: '779e8cd982532b6221b6ed1c1269098bee16f92c', 61 silly install resolved _resolved: 'https://registry.npmjs.org/memwatch/-/memwatch-0.2.2.tgz', 61 silly install resolved gypfile: true, 61 silly install resolved homepage: 'https://github.com/lloyd/node-memwatch#readme' } ] 62 info install memwatch@0.2.2 into D:\Projects\appServer 63 info installOne memwatch@0.2.2 64 verbose installOne of memwatch to D:\Projects\appServer not in flight; installing 65 verbose lock using C:\Users\OlgaKozlova\AppData\Roaming\npm-cache_locks\memwatch-5c770a4bce4f8ec7.lock for D:\Projects\appServer\node_modules\memwatch 66 silly install write writing memwatch 0.2.2 to D:\Projects\appServer\node_modules\memwatch 67 verbose unbuild node_modules\memwatch 68 silly gentlyRm D:\Projects\appServer\node_modules\memwatch is being purged from base D:\Projects\appServer 69 verbose gentlyRm don't care about contents; nuking D:\Projects\appServer\node_modules\memwatch 70 verbose tar unpack C:\Users\OlgaKozlova\AppData\Roaming\npm-cache\memwatch\0.2.2\package.tgz 71 verbose tar unpacking to D:\Projects\appServer\node_modules\memwatch 72 silly gentlyRm D:\Projects\appServer\node_modules\memwatch is being purged 73 verbose gentlyRm don't care about contents; nuking D:\Projects\appServer\node_modules\memwatch 74 silly gunzTarPerm modes [ '777', '666' ] 75 silly gunzTarPerm extractEntry package.json 76 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ] 77 silly gunzTarPerm extractEntry .npmignore 78 silly gunzTarPerm modified mode [ '.npmignore', 420, 438 ] 79 silly gunzTarPerm extractEntry README.md 80 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ] 81 silly gunzTarPerm extractEntry tests.js 82 silly gunzTarPerm modified mode [ 'tests.js', 420, 438 ] 83 silly gunzTarPerm extractEntry foo.js 84 silly gunzTarPerm modified mode [ 'foo.js', 420, 438 ] 85 silly gunzTarPerm extractEntry include.js 86 silly gunzTarPerm modified mode [ 'include.js', 420, 438 ] 87 silly gunzTarPerm extractEntry .travis.yml 88 silly gunzTarPerm modified mode [ '.travis.yml', 420, 438 ] 89 silly gunzTarPerm extractEntry ChangeLog 90 silly gunzTarPerm modified mode [ 'ChangeLog', 420, 438 ] 91 silly gunzTarPerm extractEntry #wscript# 92 silly gunzTarPerm modified mode [ '#wscript#', 420, 438 ] 93 silly gunzTarPerm extractEntry binding.gyp 94 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 438 ] 95 silly gunzTarPerm extractEntry src/heapdiff.cc 96 silly gunzTarPerm modified mode [ 'src/heapdiff.cc', 420, 438 ] 97 silly gunzTarPerm extractEntry src/heapdiff.hh 98 silly gunzTarPerm modified mode [ 'src/heapdiff.hh', 420, 438 ] 99 silly gunzTarPerm extractEntry src/init.cc 100 silly gunzTarPerm modified mode [ 'src/init.cc', 420, 438 ] 101 silly gunzTarPerm extractEntry src/memwatch.cc 102 silly gunzTarPerm modified mode [ 'src/memwatch.cc', 420, 438 ] 103 silly gunzTarPerm extractEntry src/memwatch.hh 104 silly gunzTarPerm modified mode [ 'src/memwatch.hh', 420, 438 ] 105 silly gunzTarPerm extractEntry src/platformcompat.hh 106 silly gunzTarPerm modified mode [ 'src/platformcompat.hh', 420, 438 ] 107 silly gunzTarPerm extractEntry src/util.cc 108 silly gunzTarPerm modified mode [ 'src/util.cc', 420, 438 ] 109 silly gunzTarPerm extractEntry src/util.hh 110 silly gunzTarPerm modified mode [ 'src/util.hh', 420, 438 ] 111 silly gunzTarPerm extractEntry examples/basic_heapdiff.js 112 silly gunzTarPerm modified mode [ 'examples/basic_heapdiff.js', 420, 438 ] 113 silly gunzTarPerm extractEntry examples/do_nothing_server.js 114 silly gunzTarPerm modified mode [ 'examples/do_nothing_server.js', 420, 438 ] 115 silly gunzTarPerm extractEntry examples/slightly_leaky.js 116 silly gunzTarPerm modified mode [ 'examples/slightly_leaky.js', 420, 438 ] 117 verbose write writing to D:\Projects\appServer\node_modules\memwatch\package.json 118 info preinstall memwatch@0.2.2 119 verbose readDependencies loading dependencies from D:\Projects\appServer\node_modules\memwatch\package.json 120 verbose readDependencies loading dependencies from D:\Projects\appServer\node_modules\memwatch\package.json 121 silly install resolved [] 122 verbose about to build D:\Projects\appServer\node_modules\memwatch 123 info build D:\Projects\appServer\node_modules\memwatch 124 info linkStuff memwatch@0.2.2 125 silly linkStuff memwatch@0.2.2 has D:\Projects\appServer\node_modules as its parent node_modules 126 verbose linkBins memwatch@0.2.2 127 verbose linkMans memwatch@0.2.2 128 verbose rebuildBundles memwatch@0.2.2 129 info install memwatch@0.2.2 130 verbose unsafe-perm in lifecycle true 131 info memwatch@0.2.2 Failed to exec install script 132 verbose unlock done using C:\Users\OlgaKozlova\AppData\Roaming\npm-cache_locks\memwatch-5c770a4bce4f8ec7.lock for D:\Projects\appServer\node_modules\memwatch 133 verbose stack Error: memwatch@0.2.2 install: node-gyp rebuild 133 verbose stack Exit status 1 133 verbose stack at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16) 133 verbose stack at emitTwo (events.js:87:13) 133 verbose stack at EventEmitter.emit (events.js:172:7) 133 verbose stack at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 133 verbose stack at emitTwo (events.js:87:13) 133 verbose stack at ChildProcess.emit (events.js:172:7) 133 verbose stack at maybeClose (internal/child_process.js:817:16) 133 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 134 verbose pkgid memwatch@0.2.2 135 verbose cwd D:\Projects\appServer 136 error Windows_NT 6.1.7601 137 error argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "memwatch" 138 error node v4.1.1 139 error npm v2.14.4 140 error code ELIFECYCLE 141 error memwatch@0.2.2 install: node-gyp rebuild 141 error Exit status 1 142 error Failed at the memwatch@0.2.2 install script 'node-gyp rebuild'. 142 error This is most likely a problem with the memwatch package, 142 error not with npm itself. 142 error Tell the author that this fails on your system: 142 error node-gyp rebuild 142 error You can get their info via: 142 error npm owner ls memwatch 142 error There is likely additional logging output above. 143 verbose exit [ 1, true ] 144 verbose unbuild node_modules\memwatch 145 info preuninstall memwatch@0.2.2 146 info uninstall memwatch@0.2.2 147 verbose unbuild rmStuff memwatch@0.2.2 from D:\Projects\appServer\node_modules 148 info postuninstall memwatch@0.2.2 149 silly gentlyRm D:\Projects\appServer\node_modules\memwatch is being purged from base D:\Projects\appServer 150 verbose gentlyRm don't care about contents; nuking D:\Projects\appServer\node_modules\memwatch 151 silly vacuum-fs purging D:\Projects\appServer\node_modules\memwatch 152 silly vacuum-fs quitting because other entries in D:\Projects\appServer\node_modules

OlgaKozlova commented 9 years ago

Couldn't install lib

edwinfinch commented 8 years ago

I'm rocking Ubuntu 15.04 and I'm stuck here as well, ++

shnist commented 8 years ago

Use https://www.npmjs.com/package/memwatch-next

dfernandezm commented 6 years ago

Hi I still see this issue happening ubuntu running in docker. Any extra things to try out?

npm ERR! memwatch-next@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the memwatch-next@0.3.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the memwatch-next 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 information on how to open an issue for this project with:
npm ERR!     npm bugs memwatch-next
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls memwatch-next
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/app/npm-debug.log
codebykenny commented 6 years ago

You can try https://github.com/marcominetti/node-memwatch,

This package has not been updated in over 5 years.