Skip to content
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

Web sample is not working on build #83

Open
classicalguss opened this issue May 24, 2024 · 1 comment
Open

Web sample is not working on build #83

classicalguss opened this issue May 24, 2024 · 1 comment

Comments

@classicalguss
Copy link

When running npm run build. I get the following error.

node:internal/crypto/hash:80
this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:80:19)
at Object.createHash (node:crypto:139:10)
at BulkUpdateDecorator.hashFactory (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/util/createHash.js:155:18)
at BulkUpdateDecorator.update (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/util/createHash.js:46:50)
at RawSource.updateHash (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack-sources/lib/RawSource.js:77:8)
at NormalModule._initBuildHash (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/NormalModule.js:888:17)
at handleParseResult (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/NormalModule.js:954:10)
at /Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/NormalModule.js:1048:4
at processResult (/Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/NormalModule.js:763:11)
at /Users/ghassanbarghouti/Documents/Agora-Chat-API-Examples/Chat-Web/node_modules/webpack/lib/NormalModule.js:827:5 {
opensslErrorStack: [
'error:03000086:digital envelope routines::initialization error',
'error:0308010C:digital envelope routines::unsupported'
],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v21.7.1

@myZhangDong
Copy link
Contributor

This issue is due to the use of different versions of the OpenSSL library after node 17, You can refer to this solution to solve this problem webpack/webpack#14532. export NODE_OPTIONS=--openssl-legacy-provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants