node
node copied to clipboard
getting Error: Module did not self-register. after switching to iojs v 1.0.1
Every time I try to run anything... I installed using the dmg from the website on OS X. Had previously installed node through nvm. Stack trace:
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:341:32)
at Function.Module._load (module.js:296:12)
at Module.require (module.js:351:17)
at require (module.js:370:17)
at bindings (/Users/martin.genev/Projects/how-to/server/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/Users/martin.genev/Projects/how-to/server/node_modules/bcrypt/bcrypt.js:3:35)
at Module._compile (module.js:446:26)
at Object.Module._extensions..js (module.js:464:10)
at Module.load (module.js:341:32)
@mgenev I had this error as well, just reinstalling the npm packages fixed it for me.
I tried that and when i try npm install again I get errors like these:
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:481:19: error: no type named 'ExternalAsciiStringResource' in 'v8::String'; did you mean 'ExternalStringResource'?
v8::String::ExternalAsciiStringResource *resource) {
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ExternalStringResource
/Users/martin.genev/.node-gyp/1.0.1/deps/v8/include/v8.h:2016:19: note: 'ExternalStringResource' declared here
class V8_EXPORT ExternalStringResource
^
In file included from ../src/bcrypt_node.cc:31:
../node_modules/nan/nan.h:480:36: error: redefinition of 'NanNew'
NAN_INLINE v8::Local<v8::String> NanNew(
^
../node_modules/nan/nan.h:475:36: note: previous definition is here
NAN_INLINE v8::Local<v8::String> NanNew(
^
../node_modules/nan/nan.h:2103:12: error: no member named 'IsExternalAscii' in 'v8::String'; did you mean 'IsExternal'?
if (str->IsExternalAscii()) {
^~~~~~~~~~~~~~~
IsExternal
There will be a new nan release later today that is compatible with io.js. After that, it's up to module authors (in this case bcrypt) to update to the new nan version and publish a new version. See also e.g. #404.
@wavded is true! Thx!