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

Can't install on Node 12 #99

Open
kirillgroshkov opened this issue Apr 30, 2019 · 10 comments
Open

Can't install on Node 12 #99

kirillgroshkov opened this issue Apr 30, 2019 · 10 comments

Comments

@kirillgroshkov
Copy link

Gives this stacktrace:

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/weakref/src/weakref.o
../src/weakref.cc:147:25: error: too few arguments to function call, expected 4, have 3; did you mean 'Nan::Call'?
  globalCallbackDirect->Call(Nan::GetCurrentContext()->Global(), 1, argv);
                        ^~~~
                        Nan::Call
../../nan/nan_maybe_43_inl.h:358:30: note: 'Nan::Call' declared here
inline MaybeLocal<v8::Value> Call(
                             ^
../src/weakref.cc:168:75: error: too few arguments to function call, single argument 'context' was not specified
  Local<Object> proxy = Nan::New<ObjectTemplate>(proxyClass)->NewInstance();
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/kirill/.node-gyp/12.1.0/include/node/v8.h:6244:3: note: 'NewInstance' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
  ^
/Users/kirill/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/weakref.cc:223:55: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
  Local<Boolean> rtn = Nan::New<Boolean>(cont->target.IsNearDeath());
                                         ~~~~~~~~~~~~ ^
3 errors generated.
make: *** [Release/obj.target/weakref/src/weakref.o] Error 1
gyp ERR! build error 

@kirillgroshkov
Copy link
Author

This also breaks the usage of Jest with --detectLeaks flag. Issue there: jestjs/jest#8397

@tsareg
Copy link

tsareg commented May 27, 2019

+1

1 similar comment
@agnislav
Copy link

+1

@pixelein
Copy link

pixelein commented Sep 3, 2019

Is there any update?

@kirill-konshin
Copy link

Bump! Please fix.

gaetanmaisse added a commit to storybookjs/storybook that referenced this issue Oct 5, 2019
….json

Force node to be between version 8 and 11 as `node-weak` dependency is not working on Node 12: TooTallNate/node-weak#99
This node max version can be removed as soon as we found a fix/workaround to `node-weak` and Node 12 incompatibility.
@lfender6445
Copy link

@TooTallNate have you had a chance to look at this?

@micalevisk
Copy link

same for node16

@phips28
Copy link

phips28 commented Feb 19, 2022

any update?

@Arno-v
Copy link

Arno-v commented Aug 16, 2022

I build the master branch from github for node 16 and it compiles fine! It just has never been tagged for release. I suppose the same is true fro the ref project @TooTallNate can you release it?

@Vinccool96
Copy link

Vinccool96 commented Oct 23, 2022

I decided to publish it on npm as node-weakref.

If you want to download it, it's called node-weak-ref on npm. And the working version is 1.3.0. Any contribution is appreciated.

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

10 participants