markdown-preview.nvim
markdown-preview.nvim copied to clipboard
Yarn Build Failure: ERR_OSSL_EVP_UNSUPPORTED
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
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
Upgrading next fixes this, might need to upgrade react and react-dom too.
https://github.com/vercel/next.js/issues/30078#issuecomment-958616124 https://github.com/webpack/webpack/issues/14532#issuecomment-947807590
This would be fixed by #457.