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

Cannot find module '@mapbox/node-pre-gyp' #549

Closed
alexcastillo opened this issue Jan 25, 2021 · 6 comments
Closed

Cannot find module '@mapbox/node-pre-gyp' #549

alexcastillo opened this issue Jan 25, 2021 · 6 comments

Comments

@alexcastillo
Copy link

Thank you so much for the amazing work!

I've been working on upgrading @abandonware/bluetooth-hci-socket to @mapbox/node-pre-gyp v1.0.0-alpha1 and I keep getting:

error: uncaughtException: Cannot find module '@mapbox/node-pre-gyp'

I'm using Linux arm64, node v15.4.0. I've also tried v0.15.0, v0.17.0, and v1.0.0-alpha2.

Any ideas on what I'm doing wrong?

Thank you in advance 🙏

@springmeyer
Copy link
Contributor

springmeyer commented Jan 25, 2021

I accidentally published @mapbox/node-pre-gyp as private first (just the v1.0.0-alpha1 was originally private). Then fixed after the fact. So I wonder if that is still causing problems for some reason.

Can you try installing again with the latest version:

npm install @mapbox/node-pre-gyp@1.0.0-alpha3

Does that work?

@alexcastillo
Copy link
Author

Hi @springmeyer,

Thank you for getting back to me!

I just tried v1.0.0-alpha3 and I'm still getting the same error.

image

It's so strange because I can see the @mapbox inside node_modules directory but there's nothing inside it.

image

And if I do an npm install @mapbox/node-pre-gyp, I can see it shows up:

image

I'm using Docker, I don't know if that changes anything.

@alexcastillo
Copy link
Author

I figured it out. Since node-pre-gyp is an optional dependency of another library I'm using, I need to run npm install --force.

Sorry for the trouble!

@alexcastillo
Copy link
Author

Can I buy you a cup of for your great work?

@jarryxy
Copy link

jarryxy commented May 24, 2023

useful

@ST-dev100
Copy link

npm ERR! path F:\cccc\Login&Registration Form\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! 'Registration' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! node:internal/modules/cjs/loader:1051
npm ERR!   throw err;
npm ERR!   ^
npm ERR!
npm ERR! Error: Cannot find module 'F:\cccc\@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.7.0

npm ERR! A complete log of this run can be found in: C:\Users\sima\AppData\Local\npm-cache\_logs\2023-10-06T12_32_31_584Z-debug-0.log

F:\cccc\Login&Registration Form>

Please help me this error occur when I try to install bcrypt package what shall I do?

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