Error using nodejs 0.10.0 #154

Closed
mbell8903 opened this Issue Mar 21, 2013 · 9 comments

Projects

None yet

6 participants

@mbell8903

I'm receiving the following error when attempting to require bcrypt. I'm using Ubuntu. I uninstalled and re-installed bcrypt using npm:

npm uninstall bcrypt; npm install bcrypt;

Output:
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

bcrypt@0.7.5 install /root/stuff/node_modules/bcrypt
node-gyp rebuild

make: Entering directory /root/stuff/node_modules/bcrypt/build' CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node: Finished COPY Release/bcrypt_lib.node make: Leaving directory/root/stuff/node_modules/bcrypt/build'
bcrypt@0.7.5 node_modules/bcrypt
âââ bindings@1.0.0

I'm not sure if i need to use an older version of node or not for this, but when i run my app i get the following error in the log:

/root/stuff/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^
Error: Module version mismatch. Expected 10, got 11.
at Object.Module._extensions..node (module.js:490:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at bindings (/root/stuff/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object. (/root/stuff/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:454:26)
at Object.Module._extensions..js (module.js:472:10)
at Module.load (module.js:356:32)

@ncb000gt
Collaborator

Try going into the bcrypt directory itself and recompiling the module directly.

@scriby
scriby commented Mar 26, 2013

Do you know if this module should in general be expected to work against node v0.10, or does it require special steps to get working now?

@TooTallNate
Collaborator

@scriby Whenever there's a minor version number change in node (i.e. v0.8.x -> v0.10.x), it's safe to assume you need to recompile all native modules since the ABI most likely has changed.

@ncb000gt
Collaborator

@mbell8903 Should I assume you've resolved this by recompiling the full module?

@scriby
scriby commented Mar 27, 2013

This module built fine for me against Node v0.10.1

@ryan-endacott

I'm getting this error as well. I've tried Node v0.10.0, v0.10.1, and v0.10.15. I've also run make in the bcrypt directory and all tests pass. And I've also run node-gyp configure build. I've also tried npm install and npm update in the directory to no avail.

What steps can I take to get this to work?

Thank you very much for any help.

Here is my error message:

/programming/repos/backend/node_modules/bcrypt/node_modules/bindings/bindings.js:79
        throw e
              ^
Error: Module version mismatch. Expected 11, got 1.
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at bindings (/mnt/data/programming/repos/backend/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/mnt/data/programming/repos/backend/node_modules/bcrypt/bcrypt.js:1:97)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
@mbell8903

The way I ended up resolving the issue was to uninstall all of my modules and reinstall them one by one again from scratch. Not sure why this worked but it did.

Sent from the trunk of an El Camino

On Aug 15, 2013, at 9:59 PM, Ryan Endacott notifications@github.com wrote:

I'm getting this error as well. I've tried Node v0.10.0, v0.10.1, and v0.10.15. I've also run make in the bcrypt directory and all tests pass. And I've also run node-gyp configure build. I've also tried npm install and npm update in the directory to no avail.

What steps can I take to get this to work?

Here is my error message:

/programming/repos/backend/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^
Error: Module version mismatch. Expected 11, got 1.
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/mnt/data/programming/repos/backend/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object. (/mnt/data/programming/repos/backend/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

Reply to this email directly or view it on GitHub.

@ryan-endacott

Meaning deleting the node_modules directory and then retrying npm install? I actually tried that too :/

@mbell8903

I used npm uninstall and installed bcrypt last. Not sure why it worked but it did. Your situation might be different. I'm also using 0.10.13.

Sent from the trunk of an El Camino

On Aug 15, 2013, at 11:18 PM, Ryan Endacott notifications@github.com wrote:

Meaning deleting the node_modules directory and then retrying npm install? I actually tried that too :/


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment