You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to bundle a Node project there is a problem with bundling the bcrypt module. It seems that this module has a decency on externals/native modules for which it gets it locations from package.json. This causes a problem for the bundled output file since package.json is not available.
Bundled output should work just like running the non-bundled source.
😯 Current Behavior
The following error is presented when running the bundled output:
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]
Error: package.json does not exist at /bin/package.json
at Object.exports.find (/bin/index.js:164:360)
at Object.parcelRequire.OGsn.node-pre-gyp (/bin/index.js:172:66)
at f (/bin/index.js:1:468)
at p (/bin/index.js:1:544)
at Object.parcelRequire.Focm.bcrypt (/bin/index.js:174:7)
at f (/bin/index.js:1:468)
at parcelRequire.UIdH (/bin/index.js:1:771)
at Object.<anonymous> (/bin/index.js:1:1023)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
💁 Possible Solution
Unfortunately I have not enough knowledge of the externals of Parcel to make any suggestions.
🔦 Context
💻 Code Sample
Super simple script that demonstrates the problem.
🐛 bug report
When I try to bundle a Node project there is a problem with bundling the
bcrypt
module. It seems that this module has a decency on externals/native modules for which it gets it locations frompackage.json
. This causes a problem for the bundled output file sincepackage.json
is not available.Webpack seems to have had a similar issue: angular/universal#1207
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
Bundled output should work just like running the non-bundled source.
😯 Current Behavior
The following error is presented when running the bundled output:
💁 Possible Solution
Unfortunately I have not enough knowledge of the externals of Parcel to make any suggestions.
🔦 Context
💻 Code Sample
Super simple script that demonstrates the problem.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: