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

getting Error: Module did not self-register. after switching to iojs v 1.0.1 #417

Closed
mgenev opened this issue Jan 14, 2015 · 4 comments
Closed

Comments

@mgenev
Copy link

mgenev commented Jan 14, 2015

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)
@wavded
Copy link
Contributor

wavded commented Jan 14, 2015

@mgenev I had this error as well, just reinstalling the npm packages fixed it for me.

@mgenev
Copy link
Author

mgenev commented Jan 14, 2015

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

@bnoordhuis
Copy link
Member

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.

@jcsena
Copy link

jcsena commented Feb 10, 2015

@wavded is true! Thx!

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