Can't Install Bcrypt. Node version v20.6.1
StephenStarc opened this issue · comments
Here is my error:
npm ERR! code 1
npm ERR! path D:\Movies\Nearby Share\The Complete 2023 Web Development Bootcamp\37 - Authentication & Security\Secrets - Starting Code\node_modules\bcrypt
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! The system cannot find the path specified.
npm ERR! node:internal/modules/cjs/loader:1051
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'D:\Movies\Nearby Share\The Complete 2023 Web Development Bootcamp@mapbox\node-pre-gyp\bin\node-pre-gyp'
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:901:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
npm ERR! at node:internal/main/run_main_module:23:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR!
npm ERR! Node.js v20.6.1
npm ERR! A complete log of this run can be found in: C:\Users\User\AppData\Local\npm-cache_logs\2024-04-09T05_06_12_385Z-debug-0.log
I am getting same error
Getting the same Error
I have solved it by using npm i bcryptjs
Hello all,
I found a solution and would like to share how to resolve it:
- Don;t need to delete yarn.lock
- Run
yarn why string-width
to find the library that uses it as a dependency. - Downgrade this library to the version that works, remove
node_modules
, and then runyarn install
to verify it works. - Use
yarn upgrade lib@version
to upgrade only this library.
It should work.
Happy coding!
2024-06-03