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

Installation from source fails if there is a space in the path to working directory #961

Open
recrsn opened this issue Oct 6, 2022 · 0 comments
Labels

Comments

@recrsn
Copy link
Collaborator

recrsn commented Oct 6, 2022

Underlying issue with gyp:

gyp is the build tool used by node-gyp, which is in-turn used by node-pre-gyp to compile native addons from source

If you get an error like the following while installing bcrypt then move your code to a directory without spaces anywhere in its complete path. Additionally, your $HOME should also not have any spaces in them (this is true if your username has a space in it)

npm ERR! code 1
npm ERR! path C:\Users\xxx yyy\code\The Complete 2021 Web Development Bootcamp\Course Material\32. Authentication & Security\Secrets\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! 'Security\Secrets\node_modules.bin' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'C:\Users\xxx yyy\code\The Complete 2021 Web Development Bootcamp\Course Material\node-pre-gyp\bin\node-pre-gyp'
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR! at node:internal/main/run_main_module:17:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }

npm ERR! A complete log of this run can be found in:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant