node-libs-browser
node-libs-browser copied to clipboard
0.4.2: diffie-hellman cannot find ./lib/primes
Hello,
Looks like the update from a couple hours ago could be bringing in a bug with a downstream dependency.
Dependencies go:
-
webpack 1.5.1
depends onnode-libs-browser ~0.4.0
-
node-libs-browser 0.4.2
depends oncrypto-browserify ^3.9.13
-
crypto-browserify 3.9.13
depends ondiffie-hellman ^3.0.1
-
diffie-hellman 3.0.1
breaks
Error in browser is: Cannot find module "./lib/primes"
, which is required from diffie-hellman/browser.js
Looks like there exists a ./lib/primes.json
in that package, so maybe configuring webpack to auto check ".json" suffixes would work, I'll try that.
Will also learn about npm-shrinkwrap
after this.
Any other tips for resolving issue? Thank you.
To downgrade and workaround temporarily (for anyone else that finds this thread and has the same issue:
npm install --save [email protected]
rm -Rf node_modules/webpack
npm install
This will add an explicit dependency in your package.json
for [email protected]
, so be sure to remove in that future when this issue is resolved.
@sokra This was kind of unexpected from upgrading my old webpack version! (1.5.3)... Everything that I have that relied on that crypto shim is now broken. The version there doesn't have any AES function implemented!
Adding an explicit dep to my package.json for [email protected]
fixed it.
Fixed. See https://github.com/crypto-browserify/diffie-hellman/pull/21
I receive this same error using v2.1.0-beta6
. has this been fixed?
still broken in [email protected]
. my workaround for the moment is adding the json-loader
:
const JSON_LOADER = {
loader: 'json',
test: /\.json$/,
include: [
/node_modules/
]
};
@UnsungHero97 this work well just want to point that by defualt node_modules are included so you don't need to add include: [ /node_modules/ ]
@UnsungHero97 The version of node-libs-browser
used by Webpack 2 was updated back in January (unfortunately, the v1 branch still hasn't upgraded). In any case, by the time 2.1.0-beta.7
was released the version of crypto-browserify
should have had the fixes need for diffie-hellman.
If you're still having the problem, can you give the "crypto-browserify" portion of the tree output from npm ls
? I'd really like to hunt it down and resolve it.
@terinjokes thats my output for npm ls crypto-browserify:
/var/www/html/filecloudprod └─┬ [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └ [email protected] └─┬ [email protected] (git://github.com/jeroennoten/webpack-stream.git#d78a3568e259f9cdbc64c60290639af6ef6d3baf) └─┬ [email protected] └─┬ [email protected] └── [email protected]
I still get the error, but working with laravel 5.3. Look at my post at stackoverflow.