node-memwatch icon indicating copy to clipboard operation
node-memwatch copied to clipboard

Cannot install memwatch on MacOS

Open amaljose96 opened this issue 5 years ago • 6 comments

[email protected] install /Users/.../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::Handlev8::Value New( const v8::Arguments& args ); ^~~~~~~~~~~~~ v8::internal::Arguments /Users/.../.node-gyp/10.16.0/include/node/v8.h:144: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::Handlev8::Value End( const v8::Arguments& args ); ^~~~~~~~~~~~~ v8::internal::Arguments /Users/.../.node-gyp/10.16.0/include/node/v8.h:144: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/.../.node-gyp/10.16.0/include/node/v8.h:883: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::Handlev8::Value (const v8::internal::Arguments &)' (aka 'v8::Localv8::Value (const v8::internal::Arguments &)') v8::Localv8::FunctionTemplate t = v8::FunctionTemplate::New(New); ^~~ /Users/.../.node-gyp/10.16.0/include/node/v8.h:5645:16: note: passing argument to parameter 'isolate' here Isolate isolate, FunctionCallback callback = 0, ^ ../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 FunctionCallbackInfov8::Value &)') with an lvalue of type 'v8::Handlev8::Value (const v8::internal::Arguments &)' (aka 'v8::Localv8::Value (const v8::internal::Arguments &)'): type mismatch at 1st parameter ('const FunctionCallbackInfov8::Value &' vs 'const v8::internal::Arguments &') NODE_SET_PROTOTYPE_METHOD(t, "end", End); ^~~ /Users/.../.node-gyp/10.16.0/include/node/node.h:406: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/.../.node-gyp/10.16.0/include/node/v8.h:144: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/.../.node-gyp/10.16.0/include/node/v8.h:144:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../src/heapdiff.cc:70:25: error: no member named 'New' in 'v8::String' String::New("Use the new operator to create instances of this object."))); ~~~~~~~~^ ../src/heapdiff.cc:73:21: error: calling a protected constructor of class 'v8::HandleScope' v8::HandleScope scope; ^ /Users/.../.node-gyp/10.16.0/include/node/v8.h:883: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/.../.node-gyp/10.16.0/include/node/v8.h:144: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:63: error: no member named 'New' in 'v8::String' self->before = v8::HeapProfiler::TakeSnapshot(v8::String::New("")); ~~~~~~~~~~~~^ ../src/heapdiff.cc:85:16: error: member access into incomplete type 'const v8::internal::Arguments' return args.This(); ^ /Users/.../.node-gyp/10.16.0/include/node/v8.h:144:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../src/heapdiff.cc:90:20: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations] String::Utf8Value utfString(str->ToString()); ^ /Users/.../.node-gyp/10.16.0/include/node/v8.h:2891:5: note: 'Utf8Value' has been explicitly marked deprecated here V8_DEPRECATED("Use Isolate version", ^ /Users/.../.node-gyp/10.16.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated)) ^ ../src/heapdiff.cc:97:21: error: calling a protected constructor of class 'v8::HandleScope' v8::HandleScope scope; ^ /Users/.../.node-gyp/10.16.0/include/node/v8.h:883:13: note: declared protected here V8_INLINE HandleScope() {} ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 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/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command "/usr/local/Cellar/node@10/10.14.1/bin/node" "/usr/local/Cellar/node@10/10.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/.../node_modules/memwatch gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

amaljose96 avatar Jul 17 '19 04:07 amaljose96

I receive the exact same errors using Mojave 10.14.6

ghost avatar Aug 08 '19 21:08 ghost

I am also getting the same error on my mac.

rohitkhatana avatar Jan 19 '20 18:01 rohitkhatana

This project hasn't been updated in 7 years...probably time to find something else.

thepaulstella avatar Jan 27 '20 15:01 thepaulstella

Very true ;)

On Jan 27, 2020, at 3:39 PM, Paul A. Stella II [email protected] wrote:

This project hasn't been updated in 7 years...probably time to find something else.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lloyd/node-memwatch/issues/85?email_source=notifications&email_token=AJ3FMKGORMWSQK4R5MSNLALQ73535A5CNFSM4IELFII2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ76NXQ#issuecomment-578807518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3FMKEZNP5RTBJPVWJLXLDQ73535ANCNFSM4IELFIIQ.

ghost avatar Jan 27 '20 15:01 ghost

this library worked for me, by one of the authors https://www.npmjs.com/package/memwatch-next

mahcloud avatar Apr 20 '20 17:04 mahcloud

this library worked for me, by one of the authors https://www.npmjs.com/package/memwatch-next

also getting the same error on my mac. @mahcloud

boy-good avatar Sep 07 '21 01:09 boy-good