-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Error: Can't resolve 'crypto' in '@otplib/plugin-crypto' #609
Comments
Any feedback on this!? |
Not to pile on, getting this too w/ my angular setup. I'm on angular 11 though. |
Any progress on this? Trying to use it in a React project. Looked promising!
|
Downgrading |
They can solve by adding this configuration to the webpack module.exports = {
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css'],
alias: {
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
},
},
} Remember install the polyfill ( according to your need ) npm install crypto-browserify
npm install stream-browserify |
@andres-mestra How can i edit this configuration? where do i find the webpack config? |
Hello, excuse me response late, on my case the implement in Electronjs, then the configuration you place them root folder project in the file |
Getting issue with Angular project while using it.
./node_modules/@otplib/plugin-crypto/index.js:14:29-46 - Error: Module not found: Error: Can't resolve 'crypto' in '/project/node_modules/@otplib/plugin-crypto'
Angular Info:
The text was updated successfully, but these errors were encountered: