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

Yarn Build Failure: ERR_OSSL_EVP_UNSUPPORTED #549

Open
UM-Li opened this issue Feb 6, 2023 · 3 comments
Open

Yarn Build Failure: ERR_OSSL_EVP_UNSUPPORTED #549

UM-Li opened this issue Feb 6, 2023 · 3 comments

Comments

@UM-Li
Copy link

UM-Li commented Feb 6, 2023

Describe the bug
Running $ yarn install && yarn build fails with the following error:

$ tsc -p ./ && cd app && rm -rf ./.next && next build && next export && yarn && pkg --targets node16-linux-x64,node16-macos-x64,node16-win-x64 --out-path ./bin . && rm -rf ./node_modules ./.next
[19:56:36] Compiling client
[19:56:36] Compiling server
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:140:10)
    at module.exports (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/webpack/lib/util/createHash.js:90:53)
    at NormalModule._initBuildHash (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/webpack/lib/NormalModule.js:386:16)
    at handleParseError (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/webpack/lib/NormalModule.js:434:10)
    at /home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/webpack/lib/NormalModule.js:466:5
    at /home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/webpack/lib/NormalModule.js:327:12
    at /home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/um-li/.vim/bundle/markdown-preview.nvim/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

System info:

  • OS: Arch Linux
  • Node.js version: 19.6.0
  • Yarn version: 1.22.19
@gxt-kt
Copy link

gxt-kt commented Feb 7, 2023

I have met the same problem, but l resolve it by the following
Exec export NODE_OPTIONS=--openssl-legacy-provider in your terminal and then exec yarn build .

Reference : https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

@Gee19
Copy link

Gee19 commented Mar 1, 2023

Upgrading next fixes this, might need to upgrade react and react-dom too.

vercel/next.js#30078 (comment)
webpack/webpack#14532 (comment)

@willwillsiii
Copy link

This would be fixed by #457.

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

4 participants