-
Notifications
You must be signed in to change notification settings - Fork 516
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 bundle bcrypt #874
Comments
I think I can replace |
Native nodejs modules cannot be bundled. We won't be able to fix this issue ever |
Of course, they can be bundled, and there are already many heavyweight modules with native parts, like sharp. Sharp even works on AWS Lambda. In fact, I got Therefore, I propose to reopen the issue. |
Hi,
I'm trying to bundle a node application that includes bcrypt. I am having a problem bundling bcrypt. I am using esbuild because it's quick and easy, but I think that the issue exists with any bundling solution (webpack, etc.)
I have a repro repo: https://github.com/carlgieringer/bcrypt-bundle-issue
My environment:
node v14.16.0
macOS 10.15.7
The README in the repo explains the repro steps, but basically if you build and then try and run the bundled app, it fails on bcrypt.js:5 where it passes in a path to package.json. For one, this would fail if I was trying to run the app in a directory lacking a package.json. But what happens in that repo is that node-pre-gyp complains that the package.json (the one for my example repo) is missing required fields:
Thanks!
The text was updated successfully, but these errors were encountered: