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

Unable to build on Windows 11 with Node.js v18.12.0 due to code: 'ERR_OSSL_EVP_UNSUPPORTED' #40

Open
bogdan192 opened this issue Dec 14, 2022 · 1 comment

Comments

@bogdan192
Copy link

bogdan192 commented Dec 14, 2022

When attempting to build on WIndows 11 22H2 with node v18.12.0 I get the following error:

> [email protected] build
> webpack

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\util\createHash.js:145:18)
    at BulkUpdateDecorator.update (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\util\createHash.js:46:50)
    at RawSource.updateHash (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack-sources\lib\RawSource.js:64:8)
    at NormalModule._initBuildHash (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\NormalModule.js:870:17)
    at handleParseResult (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\NormalModule.js:936:10)
    at C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\NormalModule.js:1028:4
    at processResult (C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\NormalModule.js:745:11)
    at C:\Users\UserXP\Desktop\youtube-webos\youtube-webos\node_modules\webpack\lib\NormalModule.js:809:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.12.0
@thesweepy
Copy link

I was able to fix it by first typing:
npx browserslist@latest --update-db

and then:
SET NODE_OPTIONS=--openssl-legacy-provider

after that run the build command again.

Hope that helps.

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