trying to 'npm install', getting node-gyp rebuild errors
ernestscomputer:musicomp ernest son$ npm install
> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/bufferutil/src/bufferutil.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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
> node-gyp rebuild
CXX(target) Release/obj.target/validation/src/validation.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/validation/src/validation.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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
If you don't have a space in your username then you're probably not experiencing the same problem as the original poster. If you're getting compile failures it could be because of your build environment setup or the package that you're trying to install has some problem with the version of Node.js you're using. If you still think it's a node-gyp problem then please paste your full output to a gist or similar and give us the URL so we can see if there's anything to be gleaned from it.
[email protected] install /Users/chadsfather/Desktop/All Your Desktop Groups Files/Escritorio/proyectos_web/pokeradar/testpk/node_modules/s2geometry-node node-gyp rebuild
CXX(target) Release/obj.target/NativeExtension/src/NativeExtension.o
c++: error: unrecognized command line option '-stdlib=libc++'
make: *** [Release/obj.target/NativeExtension/src/NativeExtension.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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.5.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 /Users/chadsfather/Desktop/All Your Desktop Groups Files/Escritorio/proyectos_web/pokeradar/testpk/node_modules/s2geometry-node
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
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 s2geometry-node 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 s2geometry-node
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls s2geometry-node
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/chadsfather/Desktop/All Your Desktop Groups Files/Escritorio/proyectos_web/pokeradar/testpk/npm-debug.log
OS X El Capitan node v6.2.2 npm 3.8.3
Just parroting the issue : I've had two completely separate applications fail to build in the last week, apparently due to node-gyp rebuild. One is a meteor app, running on win7, the other is on an ubuntu box - a mature application, suddenly breaking. I get very similar output to the above, due to two separate, and unrelated, parent packages (bcrypt and contextify).
Sample output :
make: Leaving directory `/users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify/build'
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-63-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v4.4.4
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.13.0-63-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
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! This is most likely a problem with the contextify 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 contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /users/jbosworth/fusion-dgo/npm-debug.log
Current versions of node / npm
Have not found a solution, yet.
+1 to this issue. I've tried all of the above, downgraded from 6 > 5, then 5 > 4 using n with no luck.
npm-debug.log snippet
1290 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
1290 verbose stack Exit status 1
1290 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
1290 verbose stack at emitTwo (events.js:100:13)
1290 verbose stack at EventEmitter.emit (events.js:185:7)
1290 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
1290 verbose stack at emitTwo (events.js:100:13)
1290 verbose stack at ChildProcess.emit (events.js:185:7)
1290 verbose stack at maybeClose (internal/child_process.js:850:16)
1290 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
1291 verbose pkgid [email protected]
1292 verbose cwd /home/drew/code/mean/app
1293 error Linux 4.4.0-31-generic
1294 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
1295 error node v5.12.0
1296 error npm v3.8.6
1297 error code ELIFECYCLE
1298 error [email protected] install: `node-pre-gyp install --fallback-to-build`
1298 error Exit status 1
1299 error Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
1299 error Make sure you have the latest version of node.js and npm installed.
1299 error If you do, this is most likely a problem with the v8-debug package,
1299 error not with npm itself.
1299 error Tell the author that this fails on your system:
1299 error node-pre-gyp install --fallback-to-build
1299 error You can get information on how to open an issue for this project with:
1299 error npm bugs v8-debug
1299 error Or if that isn't available, you can get their info via:
1299 error npm owner ls v8-debug
1299 error There is likely additional logging output above.
1300 verbose exit [ 1, true ]
@Bosworth99 @drewsmith You are omitting the actual build error.
@bnoordhuis - I believe this should be more helpfull :
> [email protected] install /users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
make: Entering directory `/users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify/build'
CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../node_modules/nan/nan_new.h:181:0,
from ../node_modules/nan/nan.h:74,
from ../src/contextify.cc:3:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:172:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
../node_modules/nan/nan_implementation_12_inl.h:172:76: note: candidate is:
In file included from /users/jbosworth/.node-gyp/4.4.4/include/node/node.h:42:0,
from ../src/contextify.cc:1:
/users/jbosworth/.node-gyp/4.4.4/include/node/v8.h:4675:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
static Local<Signature> New(
^
/users/jbosworth/.node-gyp/4.4.4/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided
In file included from ../src/contextify.cc:3:0:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:165:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:160:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:500:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:500:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:504:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:504:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:511:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:511:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/contextify.cc:3:
/users/jbosworth/.node-gyp/4.4.4/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/users/jbosworth/.node-gyp/4.4.4/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/users/jbosworth/.node-gyp/4.4.4/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/users/jbosworth/.node-gyp/4.4.4/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/contextify.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:515:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:522:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
make: Leaving directory `/users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-63-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /users/jbosworth/fusion-dgo/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v4.4.4
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.13.0-63-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
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! This is most likely a problem with the contextify 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 contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
This is a ubuntu box, node v4.4.4 npm v2.15.1
Having a very similar issue with the Bcrypt package on a win7 box: node v6.3.0 npm 3.10.3
Thanks for looking into this.
@Bosworth99 That is not a node-gyp issue. The build errors indicate that the module doesn't support node.js v4. Try upgrading to the latest contextify release.
@bnoordhuis - thats a good tip. Will work on it.
Thanks for the quick response -
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\Users\Deeksha Gupta\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Deeksha Gupta\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Deeksha Gupta\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Deeksha Gupta.node-gyp\6.3.1\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Deeksha Gupta.node-gyp\6.3.1',
gyp info spawn args '-Dnode_gyp_dir=C:\Users\Deeksha Gupta\AppData\Roaming\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\Deeksha Gupta',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\Deeksha Gupta\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: C:\Users\Deeksha Gupta) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Deeksha Gupta\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Deeksha Gupta\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Deeksha Gupta
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Anyone still facing this issue, this might help (at least worked for me, macbook pro, 10.9.5): http://stackoverflow.com/questions/21752172/invalid-deployment-target-for-stdlib-libc-on-osx-10-8
https://github.com/nodejs/node/issues/8939
Thanks @JxnGraphix, your solution worked for me!
I had the same issue. The problem was in the user's folder name, that was in Cyrillic. I created new profile and followed this instructions https://github.com/nodejs/node-gyp. It helped me
I solved my problem when I realized that I had an apt-get installed version of nodejs and nvm / npm installed node. Removed the system installed version and created a soft link from nodejs to node and it worked.
I got the same error and I solved by running the following command:
sudo npm install -g [email protected]
Nodejs - v7.2.0 Npm - 4.0.3
Had the same issue and nothing would work. Finally had to go to node 0.10.26 on the pi.
Used NVM instead of direct node install.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash nvm install 0.10.26
On Windows 10 ubuntu bash, installing build-essential using apt-get install build-essential and rerunning npm install solves the problem
I was able to reproduce this problem on OSX 10.11.6 when building a project that had a dependency of "java": "^0.6.0" changing that to "java": ">=0.6.0" worked fine after
installing Java 7 and/or Java 8 SDK.
I have a similar problem, Please tell me, Is this a problem with the node version or something else? I tried different versions node 4.., 5..., 6.. - not working
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build'
CXX(target) Release/obj.target/validation/src/validation.o
In file included from ../src/validation.cc:15:0:
../node_modules/nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:672:67: note: candidates are:
In file included from ../src/validation.cc:10:0:
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:34:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:34:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:46:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:46:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/validation.cc:15:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/zhenya/.nvm/versions/node/v4.6.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-101-generic
gyp ERR! command "/home/zhenya/.nvm/versions/node/v4.6.1/bin/node" "/home/zhenya/.nvm/versions/node/v4.6.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] install /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:0:
../node_modules/nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:672:67: note: candidates are:
In file included from ../src/bufferutil.cc:10:0:
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:34:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:34:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:46:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/zhenya/.node-gyp/4.6.1/include/node/node_buffer.h:46:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/bufferutil.cc:16:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/zhenya/.nvm/versions/node/v4.6.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-101-generic
gyp ERR! command "/home/zhenya/.nvm/versions/node/v4.6.1/bin/node" "/home/zhenya/.nvm/versions/node/v4.6.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/simple-comm-client.local/fe/node_modules/protractor/node_modules/selenium-webdriver/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
honestly i didn't read all of the stack traces here but i found in a line of mine, that something did not found the g++ lib. So i installed that and then it works for me.
sudo apt-get install g++
Worked for me
EDIT: System: "Ubuntu 14.04.5 LTS" Node: per NVM 4.7.0 NPM: 2.15.11