Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

fails on: node-gyp rebuild #2

Open
adeshpandey opened this issue May 10, 2016 · 10 comments
Open

fails on: node-gyp rebuild #2

adeshpandey opened this issue May 10, 2016 · 10 comments

Comments

@adeshpandey
Copy link

Hi,
It is failing on my system on:
node-gyp rebuild

I am using node v6.1.0 and npm 3.8.6

@bbondy
Copy link
Owner

bbondy commented May 10, 2016

pls attach a full log, thanks.

@adeshpandey
Copy link
Author

Failed at the [email protected] preinstall script 'npm install bloom-filter-cpp && npm install hashset-cpp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the abp-filter-parser-cpp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm install bloom-filter-cpp && npm install hashset-cpp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs abp-filter-parser-cpp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls abp-filter-parser-cpp
npm ERR! There is likely additional logging output above.

@adeshpandey
Copy link
Author

I am using node 5.9 and ubuntu 12.04 and tried to install but could not install and ended up with above error

@PaulRBerg
Copy link

Failing on MacOS High Sierra and node 7.9.0:

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: connect ETIMEDOUT 198.18.255.254:443
gyp ERR! stack     at Object.exports._errnoException (util.js:1050:11)
gyp ERR! stack     at exports._exceptionWithHostPort (util.js:1073:20)
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/Users/paulrberg/.nvm/versions/node/v7.9.0/bin/node" "/Users/paulrberg/.nvm/versions/node/v7.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/paulrberg/Documents/projects/cmcd/cmcd/src/node_modules/ad-block/node_modules/bloom-filter-cpp
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
npm ERR! Darwin 17.2.0
npm ERR! argv "/Users/paulrberg/.nvm/versions/node/v7.9.0/bin/node" "/Users/paulrberg/.nvm/versions/node/v7.9.0/bin/npm" "install" "bloom-filter-cpp"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bloom-filter-cpp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bloom-filter-cpp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bloom-filter-cpp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/paulrberg/Documents/projects/cmcd/cmcd/src/~/.electron-gyp/.npm/_logs/2018-01-14T11_59_25_011Z-debug.log

npm ERR! Darwin 17.2.0
npm ERR! argv "/Users/paulrberg/.nvm/versions/node/v7.9.0/bin/node" "/Users/paulrberg/.nvm/versions/node/v7.9.0/bin/npm" "rebuild"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `npm install bloom-filter-cpp && npm install hashset-cpp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script 'npm install bloom-filter-cpp && npm install hashset-cpp'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ad-block package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm install bloom-filter-cpp && npm install hashset-cpp
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ad-block
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ad-block
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/paulrberg/Documents/projects/cmcd/cmcd/src/~/.electron-gyp/.npm/_logs/2018-01-14T11_59_25_067Z-debug.log
finished: spawn npm

@saenzramiro
Copy link

@bbondy Same here on macOS & Node 8/9.

@vineetv2821993
Copy link

vineetv2821993 commented Jun 6, 2018

Hey Everyone, I am facing the same issue. Any solution Yet? Its still open

@bbondy
Copy link
Owner

bbondy commented Jun 7, 2018

Try again with using the latest published version?

@vineetv2821993
Copy link

vineetv2821993 commented Jun 7, 2018

Hi @bbondy thanks for responding,I solved the issue. The code is not able to compile with latest node 10+ (10.4.0) version so I changed my version to 9+ and now its compiling and working.

So the issue is with latest version of node.

I am installing ad-block, with npm install ad-block

I am using Mac OSX

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
../HashSetWrap.cpp:61:37: error: no matching member function for call to 'NewInstance'
args.GetReturnValue().Set(cons->NewInstance(argc, argv));
~~~~~~^~~~~~~~~~~

/Users/username/.node-gyp/10.4.0/include/node/v8.h:3908:44: note: candidate function not viable: requires single argument 'context', but 2 arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^
/Users/username/.node-gyp/10.4.0/include/node/v8.h:3905:44: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^
../HashSetWrap.cpp:66:21: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
String::Utf8Value str(args[0]->ToString());
^
/Users/username/.node-gyp/10.4.0/include/node/v8.h:2845:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/username/.node-gyp/10.4.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
../HashSetWrap.cpp:75:21: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
String::Utf8Value str(args[0]->ToString());
^
/Users/username/.node-gyp/10.4.0/include/node/v8.h:2845:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/username/.node-gyp/10.4.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
2 warnings and 1 error generated.
make: *** [Release/obj.target/hashset-cpp/HashSetWrap.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /project/node_modules/ad-block/node_modules/hashset-cpp
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@aceimnorstuvwxz
Copy link

aceimnorstuvwxz commented Jun 16, 2018

Same issue, but I found a way to go around it.

1,Move your xcode to trash
2,Run your build cmd(of course, it will fail).
3,Put your xcode back, then run your build cmd, it will compiled.
or just reinstall your xcode

And use node 9.x, 10.x not works.

I don't know why, but this works for me.

@RyanJarv
Copy link

RyanJarv commented May 4, 2019

Issue for me seemed to be node 12, using node 10 worked ok.

With brew:

brew install node@10
echo 'export PATH="/usr/local/opt/node@10/bin:$PATH"' >> ~/.bash_profile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants