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

Package not working with NodeJS 12 #34

Open
wolfy1339 opened this issue May 29, 2019 · 18 comments
Open

Package not working with NodeJS 12 #34

wolfy1339 opened this issue May 29, 2019 · 18 comments
Labels

Comments

@wolfy1339
Copy link

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
@vatosarmat
Copy link

Same issue on Ubuntu 18.04

@brandonros
Copy link
Contributor

#36

Does this fix it?

@andywer
Copy link
Owner

andywer commented Sep 25, 2019

Still not working with new v0.5.0. At least node 10 works now 🙄

Those native V8 bindings are a horror...

@dgslv
Copy link

dgslv commented Sep 25, 2019

got the same error here using node 12 =(

@brandonros
Copy link
Contributor

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

@philkunz
Copy link

@brandonros That actually makes a lot of sense!

@andywer
Copy link
Owner

andywer commented Oct 1, 2019

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().

@brandonros
Copy link
Contributor

as memwatch also provides the heap snapshot diffing

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

@andywer
Copy link
Owner

andywer commented Oct 7, 2019

@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? 😅

@danielmcq
Copy link

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.

@brandonros
Copy link
Contributor

node officially releasing the importable ‘v8’ library threw things off a bit, I’d imagine

@andywer andywer added the bug label Dec 31, 2019
chasenlehara pushed a commit to LBH3/lbh3.org that referenced this issue Mar 14, 2020
It hasn’t been updated to support Node 12: andywer/leakage#34
@sergeysova
Copy link

What about to update leakage for nodejs >= 12 ?

@dax006
Copy link

dax006 commented Sep 21, 2020

any fix for this?

@limbosounds
Copy link

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

@andywer
Copy link
Owner

andywer commented Nov 16, 2020

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 🙄

@OmgImAlexis
Copy link

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

@andywer
Copy link
Owner

andywer commented Oct 17, 2021

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.

@OmgImAlexis
Copy link

@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.

token-cjg added a commit to token-cjg/leakage that referenced this issue Sep 1, 2022
@aide-master/node-memwatch hasn't been updated for 3 years [1], so it
might be worthwhile exploring other forks like @airbnb/node-memwatch
that have been more recently touched.

After blowing away package-lock.json and rebuilding it with node
16.15.0, it appears that the node-gyp issue per [2] is fixed, so this
seems sufficient.

[1]: https://www.npmjs.com/package/@aidemaster/node-memwatch
[2]: andywer#34
token-cjg added a commit to token-cjg/leakage that referenced this issue Sep 1, 2022
@aide-master/node-memwatch hasn't been updated for 3 years [1], so it
might be worthwhile exploring other forks like @airbnb/node-memwatch
that have been more recently touched.

After blowing away package-lock.json and rebuilding it with node
16.15.0, it appears that the node-gyp issue per [2] is fixed, so this
seems sufficient.

[1]: https://www.npmjs.com/package/@aidemaster/node-memwatch
[2]: andywer#34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests