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

Cannot install on node 10.15.1 #35

Closed
hejkerooo opened this issue Aug 7, 2019 · 5 comments
Closed

Cannot install on node 10.15.1 #35

hejkerooo opened this issue Aug 7, 2019 · 5 comments

Comments

@hejkerooo
Copy link

../src/heapdiff.cc:95:20: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
        String::Utf8Value utfString(str->ToString());
                          ^
/Users/krzysztofszostak/.node-gyp/10.15.1/include/node/v8.h:2891:5: note: 'Utf8Value' has been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/krzysztofszostak/.node-gyp/10.15.1/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  CXX(target) Release/obj.target/memwatch/src/init.o
../src/init.cc:20:9: error: no type named 'AddGCEpilogueCallback' in 'v8::V8'; did you mean 'Nan::GCEpilogueCallback'?
        v8::V8::AddGCEpilogueCallback(memwatch::after_gc);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Nan::GCEpilogueCallback
../../nan/nan.h:745:35: note: 'Nan::GCEpilogueCallback' declared here
  typedef v8::Isolate::GCCallback GCEpilogueCallback;
                                  ^
../src/init.cc:20:49: error: definition or redeclaration of 'after_gc' not allowed inside a function
        v8::V8::AddGCEpilogueCallback(memwatch::after_gc);
                                      ~~~~~~~~~~^
2 errors generated.
make: *** [Release/obj.target/memwatch/src/init.o] Error 1
gyp ERR! build error 
@andywer
Copy link
Owner

andywer commented Aug 9, 2019

Hey @hejkerooo!

Are you sure that it's leakage that's causing that error? Just tried it with node 10.15.3 and it worked fine.

/tmp/leakage-test 
➜ echo '{}' > package.json

/tmp/leakage-test via ⬢ v10.15.3 
➜ npm i leakage

> @airbnb/node-memwatch@1.0.2 install /private/tmp/leakage-test/node_modules/@airbnb/node-memwatch
> node-gyp rebuild

  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
../src/heapdiff.cc:95:20: warning: 'Utf8Value' is deprecated
      [-Wdeprecated-declarations]
        String::Utf8Value utfString(str->ToString());
                          ^
/Users/andy/.node-gyp/10.15.3/include/node/v8.h:2891:5: note: 'Utf8Value' has
      been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/andy/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded
      from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  CXX(target) Release/obj.target/memwatch/src/init.o
  CXX(target) Release/obj.target/memwatch/src/memwatch.o
../src/memwatch.cc:220:39: warning: 'Int32Value' is deprecated
      [-Wdeprecated-declarations]
                deadline_in_ms = (int)(info[0]->Int32Value()); 
                                                ^
/Users/andy/.node-gyp/10.15.3/include/node/v8.h:2478:3: note: 'Int32Value' has
      been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
  ^
/Users/andy/.node-gyp/10.15.3/include/node/v8config.h:327:29: note: expanded
      from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  CXX(target) Release/obj.target/memwatch/src/util.o
  SOLINK_MODULE(target) Release/memwatch.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN leakage-test No description
npm WARN leakage-test No repository field.
npm WARN leakage-test No license field.

+ leakage@0.4.0
added 9 packages from 18 contributors and audited 9 packages in 12.339s
found 0 vulnerabilities


/tmp/leakage-test via ⬢ v10.15.3 took 13s 
➜ 

@hejkerooo
Copy link
Author

hejkerooo commented Aug 15, 2019

I've tried on 10.15.1 not 10.15.3

@brandonros
Copy link
Contributor

Error: Error loading shared library /Users/bros/repos/node-api/node_modules/@airbnb/node-memwatch/build/Release/memwatch.node: Exec format error
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at bindings (/Users/bros/repos/node-api/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/Users/bros/repos/node-api/node_modules/@airbnb/node-memwatch/include.js:2:28)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Module.replacementCompile (/Users/bros/repos/node-api/node_modules/append-transform/index.js:58:13)

@brandonros
Copy link
Contributor

#36

@andywer
Copy link
Owner

andywer commented Sep 25, 2019

Should be fixed now in v0.5.0, thanks to @brandonros and #36!

@andywer andywer closed this as completed Sep 25, 2019
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

3 participants