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

error on npm install during "node-gyp rebuild" #26

Closed
vivekanandan opened this issue May 5, 2014 · 12 comments
Closed

error on npm install during "node-gyp rebuild" #26

vivekanandan opened this issue May 5, 2014 · 12 comments

Comments

@vivekanandan
Copy link

npm http GET https://registry.npmjs.org/webworker-threads
npm http 304 https://registry.npmjs.org/webworker-threads

webworker-threads@0.4.12 install /Users/vivekanandan/Source/spawn/node_modules/webworker-threads
node-gyp rebuild

CXX(target) Release/obj.target/WebWorkerThreads/src/WebWorkerThreads.o
In file included from ../src/WebWorkerThreads.cc:36:
../src/bson.cc:199:18: error: use of undeclared identifier 'NanPersistentToLocal'
if(object->Has(NanPersistentToLocal(bson->_bsontypeString)))
^
../src/bson.cc:202:7: error: use of undeclared identifier 'NanPersistentToLocal'
if(NanPersistentToLocal(bson->longString)->StrictEquals(constructorString))
^
../src/bson.cc:205:30: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteInt32(object, NanPersistentToLocal(bson->_longLowString));
^
../src/bson.cc:206:30: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteInt32(object, NanPersistentToLocal(bson->_longHighString));
^
../src/bson.cc:208:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->timestampString)->StrictEquals(constructorString))
^
../src/bson.cc:211:30: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteInt32(object, NanPersistentToLocal(bson->_longLowString));
^
../src/bson.cc:212:30: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteInt32(object, NanPersistentToLocal(bson->_longHighString));
^
../src/bson.cc:214:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->objectIDString)->StrictEquals(constructorString))
^
../src/bson.cc:217:33: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteObjectId(object, NanPersistentToLocal(bson->_objectIDidString));
^
../src/bson.cc:219:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->binaryString)->StrictEquals(constructorString))
^
../src/bson.cc:223:35: error: use of undeclared identifier 'NanPersistentToLocal'
uint32_t length = object->Get(NanPersistentToLocal(bson->_binaryPositionString))->Uint32Value();
^
../src/bson.cc:224:43: error: use of undeclared identifier 'NanPersistentToLocal'
Local bufferObj = object->Get(NanPersistentToLocal(bson->_binaryBufferString))->ToObject();
^
../src/bson.cc:227:29: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteByte(object, NanPersistentToLocal(bson->_binarySubTypeString)); // write subtype
^
../src/bson.cc:229:20: error: use of undeclared identifier 'NanPersistentToLocal'
if(object->Get(NanPersistentToLocal(bson->_binarySubTypeString))->Int32Value() == 0x02) {
^
../src/bson.cc:235:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->doubleString)->StrictEquals(constructorString))
^
../src/bson.cc:238:31: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteDouble(object, NanPersistentToLocal(bson->_doubleValueString));
^
../src/bson.cc:240:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->symbolString)->StrictEquals(constructorString))
^
../src/bson.cc:243:49: error: use of undeclared identifier 'NanPersistentToLocal'
this->WriteLengthPrefixedString(object->Get(NanPersistentToLocal(bson->_symbolValueString))->...
^
../src/bson.cc:245:12: error: use of undeclared identifier 'NanPersistentToLocal'
else if(NanPersistentToLocal(bson->codeString)->StrictEquals(constructorString))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/WebWorkerThreads/src/WebWorkerThreads.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:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/vivekanandan/Source/spawn/node_modules/webworker-threads
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! webworker-threads@0.4.12 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads@0.4.12 install script.
npm ERR! This is most likely a problem with the webworker-threads 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 their info via:
npm ERR! npm owner ls webworker-threads
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "webworker-threads"
npm ERR! cwd /Users/vivekanandan/Source/spawn
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:

@audreyt
Copy link
Owner

audreyt commented May 5, 2014

Thanks for the report! This was broken by the new "nan" release and we've worked around the change in webworker-threads 0.4.13. Please "npm install" again and it should work.

@audreyt audreyt closed this as completed May 5, 2014
audreyt added a commit that referenced this issue May 5, 2014
  This is because nan 1.0 introducing a new API.

  /cc @senditu ; Closes #26.
@vivekanandan
Copy link
Author

Awesome, thanks for your quick response.

@guypaskar
Copy link

webworker-threads@0.4.13 install /Users/guypaskar/dev/web_14_06/node_modules/webworker-threads
node-gyp rebuild

CXX(target) Release/obj.target/WebWorkerThreads/src/WebWorkerThreads.o
In file included from ../src/WebWorkerThreads.cc:12:
../node_modules/nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:343:5: error: no member named 'ThrowException' in
namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../node_modules/nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:348:9: error: no type named 'ThrowException' in
namespace 'v8'
v8::ThrowException(error);
~~~~^
../node_modules/nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
v8::Localv8::Value err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../node_modules/nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../node_modules/nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:373:5: error: no member named 'ThrowException' in
namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../node_modules/nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:381:5: error: no member named 'ThrowException' in
namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../node_modules/nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'

define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg))

                                 ~~~~~~~~~~~~^

../node_modules/nan/nan.h:406:13: error: no member named 'smalloc' in namespace
'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'

define NAN_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                  ^

../node_modules/nan/nan.h:416:12: error: no matching function for call to 'New'
return node::Buffer::New(data, size);
^~~~~~~~~~~~~~~~~
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:28:40: note:
candidate function not viable: no known conversion from 'char ' to
'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate
isolate, size_t length);
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note:
candidate function not viable: no known conversion from 'char ' to
'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate
isolate,
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:36:40: note:
candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note:
candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/WebWorkerThreads.cc:12:
../node_modules/nan/nan.h:420:12: error: no matching function for call to 'New'
return node::Buffer::New(size);
^~~~~~~~~~~~~~~~~
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:28:40: note:
candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note:
candidate function not viable: requires at least 2 arguments, but 1 was
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:36:40: note:
candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/guypaskar/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note:
candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/WebWorkerThreads.cc:12:
../node_modules/nan/nan.h:427:26: error: no member named 'Use' in namespace
'node::Buffer'
return node::Buffer::Use(data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:727:49: error: too few arguments to function call,
single argument 'isolate' was not specified
v8::Localv8::Object obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/guypaskar/.node-gyp/4.2.2/include/node/v8.h:2933:3: note: 'New' declared
here
static Local New(Isolate* isolate);
^
In file included from ../src/WebWorkerThreads.cc:12:
../node_modules/nan/nan.h:733:49: error: too few arguments to function call,
single argument 'isolate' was not specified
v8::Localv8::Object obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/guypaskar/.node-gyp/4.2.2/include/node/v8.h:2933:3: note: 'New' declared
here
static Local New(Isolate* isolate);
^
In file included from ../src/WebWorkerThreads.cc:12:
../node_modules/nan/nan.h:740:12: error: no member named 'Dispose' in
'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
handle.Dispose();
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/WebWorkerThreads/src/WebWorkerThreads.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.4.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/guypaskar/dev/web_14_06/node_modules/webworker-threads
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Darwin 14.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! webworker-threads@0.4.13 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads@0.4.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the webworker-threads 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 their info via:
npm ERR! npm owner ls webworker-threads
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/guypaskar/dev/web_14_06/node_modules/npm-debug.log

@guypaskar
Copy link

Can't install the pkg. what should I do?

@guypaskar
Copy link

node 4.0

@audreyt
Copy link
Owner

audreyt commented Nov 22, 2015

Hmm. Sorry for the trouble. Would you like to give Node 4.2 a try?

@guypaskar
Copy link

It was on 4.2

@audreyt
Copy link
Owner

audreyt commented Nov 22, 2015

Somehow you're installing an old version of webworker-threads (0.4.12). Try this:

npm i webworker-threads@0.6.2

@guypaskar
Copy link

Will check that.

@guypaskar
Copy link

Is there an issue with the library and node 5.11.0?

For some reason node-gyp build is failing...

@guypaskar
Copy link

npm ERR! node v5.11.0
npm ERR! npm v3.8.9
npm ERR! code ELIFECYCLE

npm ERR! webworker-threads@0.7.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads@0.7.3 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 webworker-threads p

@brodycj
Copy link
Collaborator

brodycj commented May 2, 2016

I tried npm install and npm test with both node 5.11.0 and 6.0.0, with npm updated to 3.8.6 with no problems. I suspect there is something wrong with your setup. I recommend that you try building some other Nan-based projects and checking your setup very carefully.

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

4 participants