Ask questionsError: Cannot find module '...../bcrypt/lib/binding/napi-v3/bcrypt_lib.node'
After installing the newest version of node 12.6.3 and installing bcrypt 4.0.1 in my project, "npm install bcrypt" added the package successfully without errors, but then running "node app.js" I get:
Error: Cannot find module 'path_to_my_project/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node'
And indeed the folder
node_modules/bcrypt/lib is not there at all...
Why would installation not make this folder? I suspect it's something to do with node-gyp not doing it's thing, but why don't I get an error message when i do npm install?
And I tried reverting to my old node version 8.11.1 using https://www.npmjs.com/package/n to manage my node versions and then installing bcrypt 2.0.1 (like I had previously), but it's behaving the exact same way... npm install adds the package but the bcrypt/lib folder is missing. I also tried with node 12.6.1 and 12.6.2, same thing.
Answer questions spicecoder
node-pre-gyp install --fallback-to-build.. solved my issue too thanks