Closed kahanu closed 4 years ago
@kahanu I'm not sure what you mean, as crypto is a built-in module, and the package doesn't use any other downloadable ones. Is this for the browser?
I got this error in Angular 4.x. Maybe your NPM package isn't built for Angular. If that's the case, then disregard this issue.
@brendanashworth I hope you don't mind me answering this issue.
@kahanu There was a PR once, but me and brendan decided on not merging it. Instead, there's a fork of this project which provides support for Angular. It's based on the same code. You can find it here: https://github.com/xama5/generate-password-browser
@xama5 Thanks for the info. I'll go checkout the other repo.
Am getting error, could not find main module: Error: Cannot find module crypto at generate.js:1:76
@josiahking could you open a new issue?
Don't assume crypto
is on the browser. That's a node module and its quite common to remove it using build steps.
I'm going to go ahead and close this issue as there isn't much to do here besides using the browser fork.
I try to use this package with webpack-encore but always module build failed to compile with errors.
Module build failed: Module not found:
"./node_modules/generate-password/src/generate.js" contains a reference to the file "crypto".
This file can not be found, please check it for typos or update it if the file got moved.
Can anybody help me?
Can you update the NPM package to include the required dependencies, such as crypto?