-
-
Couldn't load subscription status.
- Fork 208
Open
Description
I have been having issues with browserified code using this package because it depends on non-browserified code to implement itself.
Basically, this line is the issue:
exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes');When you require crypto-browserify, you're not using the non-browserified crypto package. But if you go to randombytes' implementation, it requires crypto in its code. This causes two issues:
- If you are resolving requires to
cryptoascrypto-browserify, you get a circular dependency and therandomBytesfield becomesundefined. - If you are not,
randombyteswill just require regularcrypto, which defeats the whole purpose of using a browserified package in the first place. You probably won't have it available in your environment and just end up with nothing in therandomBytesfield anyway.
Maybe this is an issue for randombytes instead. But I figured that most packages that depend on randomBytes usually require crypto instead of randombytes.
Metadata
Metadata
Assignees
Labels
No labels