PS C:\Users\hazzaldo\Desktop\Section-31-Authentication-&-Security\share-secret-anonymously-web-app> npm install bcrypt
> [email protected] install C:\Users\hazzaldo\Desktop\Section-31-Authentication-&-Security\share-secret-anonymously-web-app\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build
'-Security\share-secret-anonymously-web-app\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:960
throw err;
^
Error: Cannot find module 'C:\Users\hazzaldo\Desktop\node-pre-gyp\bin\node-pre-gyp'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hazzaldo\AppData\Roaming\npm-cache\_logs\2020-05-01T11_29_06_865Z-debug.log
Which version of nodejs and OS?
Nodejs version (v12.16.3). Windows 10 (version 10.0.17763 build 17763).
If you find a bug, please write a failing test.
I'm not sure why it's looking for node-pre-gyp\bin\node-pre-gyp in the directory C:\Users\hazzaldo\Desktop\. There's no such directory there!!
Steps I tried
I installed node-pre-gyp and then tried to install bcrypt, with the following sequence:
npm i node-pre-gyp, which showed it installed the package. Then npm install bcrypt --save. I get the same error.
I tried deleting node_modules, then I installed bcrypt: npm install bcrypt. That sequence did not work (same error). Then tried a different sequence: delete node_modules, then npm install, then npm install bcrypt. Still get the same error
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the & character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the
&character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!
Thanks it helped! I had a space in my folder!
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the
&character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!
Had the exact same problem in the exact same course. Thanks for posting your solution!
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the
&character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!
Thank you so much for your reply. I had the same issue since the last two days, and you saved my time. 馃憤
saved me, thank you! If anyone crosses this post & and [] throw of the installers from what I have found. Just use letter if possible
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the&character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!Had the exact same problem in the exact same course. Thanks for posting your solution!
i am facing the same issue and i have checked the folder name its alright not containing any special character or space...
- What went wrong?
I'm trying to install Bcrypt with Nodejs Express server using NPM. I've updated the latest Nodejs version (v12.16.3). Whether I install the latest version of Bcrypt or an earlier version, I'm always getting the same error:PS C:\Users\hazzaldo\Desktop\Section-31-Authentication-&-Security\share-secret-anonymously-web-app> npm install bcrypt > [email protected] install C:\Users\hazzaldo\Desktop\Section-31-Authentication-&-Security\share-secret-anonymously-web-app\node_modules\bcrypt > node-pre-gyp install --fallback-to-build '-Security\share-secret-anonymously-web-app\node_modules\.bin\' is not recognized as an internal or external command, operable program or batch file. internal/modules/cjs/loader.js:960 throw err; ^ Error: Cannot find module 'C:\Users\hazzaldo\Desktop\node-pre-gyp\bin\node-pre-gyp' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15) at Function.Module._load (internal/modules/cjs/loader.js:840:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm WARN [email protected] No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hazzaldo\AppData\Roaming\npm-cache\_logs\2020-05-01T11_29_06_865Z-debug.log
- Which version of nodejs and OS?
Nodejs version (v12.16.3). Windows 10 (version 10.0.17763 build 17763).- If you find a bug, please write a failing test.
I'm not sure why it's looking fornode-pre-gyp\bin\node-pre-gypin the directoryC:\Users\hazzaldo\Desktop\. There's no such directory there!!- Steps I tried
I installednode-pre-gypand then tried to install bcrypt, with the following sequence:
npm i node-pre-gyp, which showed it installed the package. Thennpm install bcrypt --save. I get the same error.I tried deleting
node_modules, then I installed bcrypt:npm install bcrypt. That sequence did not work (same error). Then tried a different sequence: deletenode_modules, thennpm install, thennpm install bcrypt. Still get the same error
Thanks a lot for posting this issue
Most helpful comment
Ok, after two days of pulling my hair out, trying solutions out and not getting anywhere, I finally found a reddit post with someone having exactly the same issue as me: https://www.reddit.com/r/node/comments/gahkjl/npm_drives_me_crazy_for_months_looks_for_bin/
It's because I used the
&character in my folder name. Removing this character from my folder name resolved it. Not sure whether this is an npm or a bcrypt issue!!