Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on node version 12.13.1 #48

Open
vikcygit opened this issue Jan 9, 2020 · 5 comments
Open

Cannot install on node version 12.13.1 #48

vikcygit opened this issue Jan 9, 2020 · 5 comments

Comments

@vikcygit
Copy link

vikcygit commented Jan 9, 2020

Am trying to install node-memwatch for my app & node version 12.13.1
However, getting an error regd-

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/vn0n2oy/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/.nvm/versions/node/v12.13.1/bin/node" "/Users/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

Any advise is helpful. Also, If there is any other npm module apart from this one which is widely used for memory leaks, please share the same.
Thanks for looking.

@fmquaglia
Copy link

fmquaglia commented Jan 9, 2020

I just got exactly the same problem:

  • OS: macOS 10.14.6
  • nvm v0.33.11
  • node v12.13.0
npm install memwatch-next 

> memwatch-next@0.3.0 install /Users/fabricio/projects/service-cassini-task/src/node_modules/memwatch-next
> node-gyp rebuild

  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:12:
../src/heapdiff.hh:18:38: error: no template named 'Handle' in namespace 'v8'
        static void Initialize ( v8::Handle<v8::Object> target );
                                 ~~~~^
../src/heapdiff.cc:46:21: error: variable has incomplete type 'void'
heapdiff::HeapDiff::Initialize ( v8::Handle<v8::Object> target )
                    ^
../src/heapdiff.cc:46:55: error: expected '(' for function-style cast or type construction
heapdiff::HeapDiff::Initialize ( v8::Handle<v8::Object> target )
                                            ~~~~~~~~~~^
../src/heapdiff.cc:46:38: error: no member named 'Handle' in namespace 'v8'
heapdiff::HeapDiff::Initialize ( v8::Handle<v8::Object> target )
                                 ~~~~^
../src/heapdiff.cc:46:57: error: use of undeclared identifier 'target'
heapdiff::HeapDiff::Initialize ( v8::Handle<v8::Object> target )
                                                        ^
../src/heapdiff.cc:46:65: error: expected ';' after top level declarator
heapdiff::HeapDiff::Initialize ( v8::Handle<v8::Object> target )
                                                                ^
                                                                ;
../src/heapdiff.cc:132:14: error: unknown type name 'idset'
void setDiff(idset a, idset b, vector<uint64_t> &c)
             ^
../src/heapdiff.cc:132:23: error: unknown type name 'idset'
void setDiff(idset a, idset b, vector<uint64_t> &c)
                      ^
../src/heapdiff.cc:134:10: error: use of undeclared identifier 'idset'
    for (idset::iterator i = a.begin(); i != a.end(); i++) {
         ^
../src/heapdiff.cc:134:17: error: use of class template 'iterator' requires template arguments
    for (idset::iterator i = a.begin(); i != a.end(); i++) {
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:539:29: note: template is declared here
struct _LIBCPP_TEMPLATE_VIS iterator
                            ^
../src/heapdiff.cc:182:25: error: use of undeclared identifier 'handleToStr'
            type.append(handleToStr(node->GetName()));
                        ^
../src/heapdiff.cc:223:8: error: no template named 'Handle'
static Handle<Value> changesetToObject(changeset & changes)
       ^
../src/heapdiff.cc:230:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        d->Set(Nan::New("what").ToLocalChecked(), Nan::New(i->first.c_str()).ToLocalChecked());
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:231:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        d->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New<v8::Number>(i->second.size));
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:232:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        d->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(i->second.size).c_str()).ToLocalChecked());
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:233:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        d->Set(Nan::New("+").ToLocalChecked(), Nan::New<v8::Number>(i->second.added));
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:234:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        d->Set(Nan::New("-").ToLocalChecked(), Nan::New<v8::Number>(i->second.released));
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:235:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
        a->Set(a->Length(), d);
           ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:238:12: error: no viable conversion from returned value of type 'v8::Local<Array>' to function return type 'int'
    return scope.Escape(a);
           ^~~~~~~~~~~~~~~
../src/heapdiff.cc:252:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    b->Set(Nan::New("nodes").ToLocalChecked(), Nan::New(before->GetNodesCount()));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:254:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    o->Set(Nan::New("before").ToLocalChecked(), b);
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:257:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    a->Set(Nan::New("nodes").ToLocalChecked(), Nan::New(after->GetNodesCount()));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:259:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    o->Set(Nan::New("after").ToLocalChecked(), a);
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:264:5: error: use of undeclared identifier 'buildIDSet'
    buildIDSet(&beforeIDs, before->GetRoot(), s);
    ^
../src/heapdiff.cc:265:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    b->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(s));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:266:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    b->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(s).c_str()).ToLocalChecked());
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:270:5: error: use of undeclared identifier 'buildIDSet'
    buildIDSet(&afterIDs, after->GetRoot(), s);
    ^
../src/heapdiff.cc:271:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    a->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(s));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:272:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    a->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(s).c_str()).ToLocalChecked());
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:277:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    c->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(diffBytes));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:278:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    c->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(diffBytes).c_str()).ToLocalChecked());
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:279:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    o->Set(Nan::New("change").ToLocalChecked(), c);
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:284:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    c->Set(Nan::New("freed_nodes").ToLocalChecked(), Nan::New<v8::Number>(changedIDs.size()));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/heapdiff.cc:300:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
    c->Set(Nan::New("allocated_nodes").ToLocalChecked(), Nan::New<v8::Number>(changedIDs.size()));
       ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/fabricio/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
19 warnings and 15 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 (/Users/fabricio/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/fabricio/.nvm/versions/node/v12.13.0/bin/node" "/Users/fabricio/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/fabricio/projects/service-cassini-task/src/node_modules/memwatch-next
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN acorn-jsx@5.1.0 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
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/fabricio/.npm/_logs/2020-01-09T19_06_11_776Z-debug.log

@partisan-bobryk
Copy link

Same issue!

@Haisum92
Copy link

Facing same issue.

@Tombarr
Copy link

Tombarr commented Apr 2, 2020

Same issue here.

@summit2020
Copy link

summit2020 commented Apr 7, 2020

Facing the same issue after upgrading the node from v8.11.4 to v12.16.1.

memwatch-next@0.3.0 install /Users/Sumit/meteor_1_9_3/meteor-1.9.3/node_modules/memwatch-next
node-gyp rebuild

CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:12:
../src/heapdiff.hh:18:38: error: no template named 'Handle' in namespace 'v8'
static void Initialize ( v8::Handlev8::Object target );
~~~~^
../src/heapdiff.cc:46:21: error: variable has incomplete type 'void'
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
19 warnings and 15 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 (/Users/Sumit/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/Sumit/.nvm/versions/node/v12.16.1/bin/node" "/Users/Sumit/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Sumit/meteor_1_9_3/meteor-ndm-1.9.3/node_modules/memwatch-next
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
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/Sumit/.npm/_logs/2020-04-07T16_17_30_275Z-debug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants