leakage icon indicating copy to clipboard operation
leakage copied to clipboard

Package not working with NodeJS 12

Open wolfy1339 opened this issue 5 years ago ā€¢ 18 comments

This could possibly also be due to VS 2019, but I doubt it

> @airbnb/[email protected] install C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch
> node-gyp rebuild


C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch>if not defined npm_config_node_gyp (node "C:\Users\<User>\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\<User>\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  heapdiff.cc
  init.cc
  memwatch.cc
  util.cc
  win_delay_load_hook.cc
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwat
ch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\memwatch.cc)
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\memwatch.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(127): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwa
tch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\memwatch.cc)
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\memwatch.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2039: 'Handle': is not a member of 'v8' (compiling source file ..\src\memwatch.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bui
ld\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8-profiler.h(48): note: see declaration of 'v8' (compiling source file ..\src\memwatch.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2061: syntax error: identifier 'Handle' (compiling source file ..\src\memwatch.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bui
ld\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\memwatch.cc(19): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\me
mwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwat
ch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\heapdiff.cc)
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\heapdiff.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(127): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwa
tch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\heapdiff.cc)
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\heapdiff.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2039: 'Handle': is not a member of 'v8' (compiling source file ..\src\heapdiff.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bui
ld\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\heapdiff.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2061: syntax error: identifier 'Handle' (compiling source file ..\src\heapdiff.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bui
ld\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): error C2039: 'Handle': is not a member of 'v8' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8-platform.h(16): note: see declaration of 'v8'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): error C2065: 'Handle': undeclared identifier [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): error C2275: 'v8::Object': illegal use of this type as an expression [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]  
  c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): note: see declaration of 'v8::Object'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): error C2065: 'target': undeclared identifier [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(46): error C2761: 'void heapdiff::HeapDiff::Initialize(void)': redeclaration of member is not allowed [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwa 
tch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(47): error C2448: 'heapdiff::HeapDiff::Initialize': function-style initializer appears to be a function definition [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airb 
nb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwat
ch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\init.cc)
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\init.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bui 
ld\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan_object_wrap.h(127): error C2039: 'IsNearDeath': is not a member of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwa 
tch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\init.cc)c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(93): error C2143: syntax error: missing ',' before '<'
  
  c:\users\<User>\desktop\programming\rest.js\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>'
          with
          [
              T=v8::Object
          ] (compiling source file ..\src\init.cc)
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(95): error C2065: 'str': undeclared identifier [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(95): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch
\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2039: 'Handle': is not a member of 'v8' (compiling source file ..\src\init.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\m
emwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8-profiler.h(48): note: see declaration of 'v8' (compiling source file ..\src\init.cc)c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(110): error C2664: 'std::string handleToStr
  (const int)': cannot convert argument 1 from 'v8::Local<v8::String>' to 'const int'

  c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(110): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.hh(18): error C2061: syntax error: identifier 'Handle' (compiling source file ..\src\init.cc) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\m 
emwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): error C2039: 'Handle': is not a member of 'v8' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8-profiler.h(48): note: see declaration of 'v8'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): error C2065: 'Handle': undeclared identifier [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): error C2275: 'v8::Object': illegal use of this type as an expression [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): note: see declaration of 'v8::Object'c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(182): error C2664: 'std::string handleToStr 
  (const int)': cannot convert argument 1 from 'v8::Local<v8::String>' to 'const int'
  
  c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(182): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): error C2065: 'target': undeclared identifier [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(12): error C2182: 'init': illegal use of type 'void' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(13): error C2448: 'init': function-style initializer appears to be a function definition [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatc 
h.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\init.cc(24): warning C4312: 'type cast': conversion from 'int' to 'node::addon_register_func' of greater size [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\
build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(223): error C2143: syntax error: missing ';' before '<' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(223): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\bu 
ild\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(224): error C2143: syntax error: missing ';' before '{' [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(224): error C2447: '{': missing function header (old-style formal list?) [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(307): error C3861: 'changesetToObject': identifier not found [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(252): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(254): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(257): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(259): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(265): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(266): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(271): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(272): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(277): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(278): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(279): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(284): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\users\<User>\desktop\programming\rest.js\node_modules\@airbnb\node-memwatch\src\heapdiff.cc(300): warning C4996: 'v8::Object::Set': was declared deprecated [C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
  c:\users\<User>\.node-gyp\12.2.0\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\<User>\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\<User>\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\<User>\Desktop\Programming\rest.js\node_modules\@airbnb\node-memwatch
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @airbnb/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @airbnb/[email protected] 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!     C:\Users\<User>\AppData\Roaming\npm-cache\_logs\2019-05-25T23_11_48_315Z-debug.log

wolfy1339 avatar May 29 '19 07:05 wolfy1339

Same issue on Ubuntu 18.04

vatosarmat avatar Jul 26 '19 08:07 vatosarmat

https://github.com/andywer/leakage/pull/36

Does this fix it?

brandonros avatar Sep 24 '19 20:09 brandonros

Still not working with new v0.5.0. At least node 10 works now šŸ™„

Those native V8 bindings are a horror...

andywer avatar Sep 25 '19 06:09 andywer

got the same error here using node 12 =(

dgslv avatar Sep 25 '19 21:09 dgslv

Can we refactor package to use https://nodejs.org/api/v8.html#v8_v8_getheapstatistics instead of memwatch?

brandonros avatar Sep 25 '19 22:09 brandonros

@brandonros That actually makes a lot of sense!

philkunz avatar Sep 30 '19 17:09 philkunz

Sorry for the late response. Yeah, that sounds like a good idea, but it will come with some effort, as memwatch also provides the heap snapshot diffing - we would have to re-implement that and make sure to garbage-collect thoroughly after diffing to not pollute the next snapshot.

I suppose that additional full GC will in turn slow down things even more šŸ˜• Might still be worth doing it, though.

Alternative 1: We extract the C++ code for heap diffing into a package of its own and use it to heap diff without touching the heap. Even better: Let's compile it to WASM.

Alternative 2: Let's re-fork memwatch and make it use the node.js getHeapStatistics() function in newer node versions.

Edit: I did a mistake here. I was writing about v8.getHeapStatistics() while I actually meant v8.getHeapSnapshot().

andywer avatar Oct 01 '19 09:10 andywer

as memwatch also provides the heap snapshot diffing

Can you outline what that would look like in a require('v8').getHeapStatistics() world?

brandonros avatar Oct 01 '19 15:10 brandonros

@brandonros Sorry once more for the late response ā€“ just so much to do...

I think getHeapStatistics() won't do. What we'd need to use is getHeapSnapshot() (v8 module in node 11.13+) as it comes with all the details we need to print an error message that gives you enough information to hunt down that memory leak.

We could publish a new package for heap snapshotting that uses memwatch is the local node version is < 12 and uses v8.getHeapSnapshot() in node 12+. Then we'd still need the heap diffing functionality that memwatch currently provides, but in a way (webassembly?) that it does not touch the heap.

The changes in leakage would be straight forward then:

- const diffStart = new memwatch.HeapDiff()
- // ...
- const heapdiff = diffStart.end()
+ const snapshot1 = heapSnapshotPackage.createSnapshot()
+ // ...
+ const snapshot2 = heapSnapshotPackage.createSnapshot()
+ const heapdiff = heapDiffer.diff(snapshot1, snapshot2)

I wonder if it's not significantly easier to just fork and patch memwatch once more... Any volunteers? šŸ˜…

andywer avatar Oct 07 '19 06:10 andywer

How many times has memwatch been forked now? I would have thought that the airbnb fork would be better maintained, but I guess not. Their last release was in May 2018.

danielmcq avatar Nov 04 '19 18:11 danielmcq

node officially releasing the importable ā€˜v8ā€™ library threw things off a bit, Iā€™d imagine

brandonros avatar Nov 04 '19 18:11 brandonros

What about to update leakage for nodejs >= 12 ?

sergeysova avatar Jun 18 '20 07:06 sergeysova

any fix for this?

dax006 avatar Sep 21 '20 16:09 dax006

Is this package dead or alive? T_T Or may be there some alternatives?

limbosounds avatar Nov 16 '20 16:11 limbosounds

More dead than alive at the moment, tbh. We would really need a more stable solution under the hood that doesn't break with every other node.js release which is not impossible, but I hardly have the time to re-invent the low-level internals šŸ™„

andywer avatar Nov 16 '20 16:11 andywer

Sorry to bump an old issue but does anyone know any alternatives to this since this hasn't been updated in years?

OmgImAlexis avatar Oct 16 '21 22:10 OmgImAlexis

Thanks for bringing this back up, @OmgImAlexis. Unfortunately, I don't have the time to update it / re-implement it for today's node.js, though. So I don't really see a short-term fix here, unless someone feels like making a major contribution or a rewrite.

andywer avatar Oct 17 '21 20:10 andywer

@andywer I might have a play around over the next few weeks and see if I can get something working. Not promising anything though as this gets down to a lower level than I'm familiar with.

OmgImAlexis avatar Oct 17 '21 21:10 OmgImAlexis