简体   繁体   中英

NodeJS - Error: The specified procedure could not be found.bcrypt_lib.node

I have upgraded from Node.js 0.12.7 to 4.2.1, getting the following error when starting my server:

$ node server.js
C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\node_modules\bindings\bindings.js:83
        throw e
        ^

Error: The specified procedure could not be found.
\\?\C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\build\Release\bcrypt_lib.node
    at Error (native)
    at Object.Module._extensions..node (module.js:460:18)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at bindings (C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\node_modules\bindings\bindings.js:76:44)
    at Object.<anonymous> (C:\Users\me\documents\github\angular-express-auth\node_modules\bcrypt\bcrypt.js:3:35)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (C:\Users\me\documents\github\angular-express-auth\server\config\mongo_database.js:2:14)
    at Module._compile (module.js:435:26)

In fact the node-gyp build is failing that's causing this specific issue or vice-versa, not sure how exactly both are linked.It was working perfectly fine till the Node.js version upgrade. I have the dependencies installed (Python v2.7.3,Microsoft Visual c++ 2015), have the environmental variables setup correctly too. Please help.

It's a problem with the version mismatch between node js and bcrypt module. Uninstalled bcrypt using npm in my project and reinstalled the same, now it's successfully building the node-gyp module (bcrypt installation always builds the node-gyp and creates a new binding file) and the app is running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM