eduardbme / node-memwatch

A NodeJS library to keep an eye on your memory usage, and discover and isolate leaks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install node-memwatch error ( node v14.17 )

flameleo11 opened this issue · comments

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Now using node v14.17.5 (npm v6.14.14)
npm i node-memwatch

`
me@e7-desktop:/drive_d/work/node_mem_test$ nvm install --lts
Installing latest LTS version.
Downloading and installing node v14.17.5...
Downloading https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-x64.tar.xz...
############################################################################################################ 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v14.17.5 (npm v6.14.14)
me@e7-desktop:/drive_d/work/node_mem_test$ nvm use v14.17.5
Now using node v14.17.5 (npm v6.14.14)
me@e7-desktop:/drive_d/work/node_mem_test$ node -v
v14.17.5
me@e7-desktop:/drive_d/work/node_mem_test$ npm i node-memwatch

node-memwatch@1.0.1 install /drive_d/work/node_mem_test/node_modules/node-memwatch
node-gyp rebuild

make: Entering directory '/drive_d/work/node_mem_test/node_modules/node-memwatch/build'
CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:12:0:
../src/heapdiff.hh:18:38: error: ‘v8::Handle’ has not been declared
static void Initialize ( v8::Handlev8::Object target );
^~~~~~
../src/heapdiff.hh:18:44: error: expected ‘,’ or ‘...’ before ‘<’ token
static void Initialize ( v8::Handlev8::Object target );
^
../src/heapdiff.cc:46:38: error: variable or field ‘Initialize’ declared void
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
^~~~~~
../src/heapdiff.cc:46:38: error: ‘Handle’ is not a member of ‘v8’
../src/heapdiff.cc:46:38: note: suggested alternative: ‘JobHandle’
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
^~~~~~
JobHandle
../src/heapdiff.cc:46:55: error: expected primary-expression before ‘>’ token
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
^
../src/heapdiff.cc:46:57: error: ‘target’ was not declared in this scope
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
^~~~~~
../src/heapdiff.cc:46:57: note: suggested alternative: ‘tzset’
heapdiff::HeapDiff::Initialize ( v8::Handlev8::Object target )
^~~~~~
tzset
../src/heapdiff.cc: In function ‘std::__cxx11::string handleToStr(const v8::Localv8::Value&)’:
../src/heapdiff.cc:97:53: error: no matching function for call to ‘v8::Value::ToString()’
String::Utf8Value utfString(isolate, str->ToString());
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:2810:44: note: candidate: v8::MaybeLocalv8::String v8::Value::ToString(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal ToString(
^~~~~~~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:2810:44: note: candidate expects 1 argument, 0 provided
../src/heapdiff.cc: At global scope:
../src/heapdiff.cc:226:8: error: ‘Handle’ does not name a type; did you mean ‘rand_r’?
static Handle changesetToObject(changeset & changes)
^~~~~~
rand_r
../src/heapdiff.cc: In function ‘v8::Localv8::Value compare(const v8::HeapSnapshot*, const v8::HeapSnapshot*)’:
../src/heapdiff.cc:255:81: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Int32::return_t)’
b->Set(Nan::New("nodes").ToLocalChecked(), Nan::New(before->GetNodesCount()));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:257:50: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::Object&)’
o->Set(Nan::New("before").ToLocalChecked(), b);
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:260:80: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Int32::return_t)’
a->Set(Nan::New("nodes").ToLocalChecked(), Nan::New(after->GetNodesCount()));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:262:49: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::Object&)’
o->Set(Nan::New("after").ToLocalChecked(), a);
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:268:64: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Int32::return_t)’
b->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(s));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:269:102: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::String)’
b->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(s).c_str()).ToLocalChecked());
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:274:64: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Int32::return_t)’
a->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(s));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:275:102: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::String)’
a->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(s).c_str()).ToLocalChecked());
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:280:72: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::IntegerFactoryv8::Int32::return_t)’
c->Set(Nan::New("size_bytes").ToLocalChecked(), Nan::New(diffBytes));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:281:110: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::String)’
c->Set(Nan::New("size").ToLocalChecked(), Nan::New(mw_util::niceSize(diffBytes).c_str()).ToLocalChecked());
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:282:50: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, v8::Localv8::Object&)’
o->Set(Nan::New("change").ToLocalChecked(), c);
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:287:93: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::FactoryBasev8::Number::return_t)’
c->Set(Nan::New("freed_nodes").ToLocalChecked(), Nan::Newv8::Number(changedIDs.size()));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:303:97: error: no matching function for call to ‘v8::Object::Set(v8::Localv8::String, Nan::imp::FactoryBasev8::Number::return_t)’
c->Set(Nan::New("allocated_nodes").ToLocalChecked(), Nan::Newv8::Number(changedIDs.size()));
^
In file included from ../src/heapdiff.hh:8:0,
from ../src/heapdiff.cc:12:
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, v8::Localv8::Value, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3670:37: note: candidate expects 3 arguments, 2 provided
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate: v8::Maybe v8::Object::Set(v8::Localv8::Context, uint32_t, v8::Localv8::Value)
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^~~
/home/me/.cache/node-gyp/14.17.5/include/node/v8.h:3673:37: note: candidate expects 3 arguments, 2 provided
../src/heapdiff.cc:310:50: error: ‘changesetToObject’ was not declared in this scope
c->Set(Nan::New("details").ToLocalChecked(), changesetToObject(changes));
^~~~~~~~~~~~~~~~~
../src/heapdiff.cc:310:50: note: suggested alternative: ‘changeset’
c->Set(Nan::New("details").ToLocalChecked(), changesetToObject(changes));
^~~~~~~~~~~~~~~~~
changeset
memwatch.target.mk:114: recipe for target 'Release/obj.target/memwatch/src/heapdiff.o' failed
make: *** [Release/obj.target/memwatch/src/heapdiff.o] Error 1
make: Leaving directory '/drive_d/work/node_mem_test/node_modules/node-memwatch/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/me/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.0-81-generic
gyp ERR! command "/home/me/.nvm/versions/node/v14.17.5/bin/node" "/home/me/.nvm/versions/node/v14.17.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /drive_d/work/node_mem_test/node_modules/node-memwatch
gyp ERR! node -v v14.17.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN node_mem_test@1.0.0 No description
npm WARN node_mem_test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-memwatch@1.0.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-memwatch@1.0.1 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! /home/me/.npm/_logs/2021-08-30T07_37_00_866Z-debug.log

`