Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Install Bcrypt. Node version v20.6.1 #1030

Open
StephenStarc opened this issue Apr 9, 2024 · 4 comments
Open

Can't Install Bcrypt. Node version v20.6.1 #1030

StephenStarc opened this issue Apr 9, 2024 · 4 comments

Comments

@StephenStarc
Copy link

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

@debjeetproso
Copy link

I am getting same error

@sachin96Boy
Copy link

Getting the same Error

@debjeetproso
Copy link

I have solved it by using npm i bcryptjs

@qfdk
Copy link

qfdk commented May 31, 2024

Hello all,

I found a solution and would like to share how to resolve it:

  1. Don;t need to delete yarn.lock
  2. Run yarn why string-width to find the library that uses it as a dependency.
  3. Downgrade this library to the version that works, remove node_modules, and then run yarn install to verify it works.
  4. Use yarn upgrade lib@version to upgrade only this library.

It should work.

Happy coding!

2024-06-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants