https://github.com/webpack/webpack/issues/14532#issuecomment-947012063
https://stackoverflow.com/questions/69692842/error0308010cdigital-envelope-routinesunsupported
https://stackoverflow.com/questions/69665222/node-17-0-1-causes-some-error-digital-envelope-routinesunsupported
export NODE_OPTIONS=--openssl-legacy-provider
- webpack5 修复 node v17 ssl Bug https://github.com/webpack/webpack/releases/tag/v5.61.0
- https://github.com/webpack/webpack/issues/14532
—openssl-legacy-provider
https://github.com/webpack/webpack/issues/14532
monkey patching crypto for md4 and Node.js v17
We are planning to migrate to a different hash function anyway for webpack 6. So currently you will have to use output.hashFunction: “xxhash64” in configuration to fix that. Or —openssl-legacy-provider
export NODE_OPTIONS=--openssl-legacy-provider
node.js 17 uses OpenSSL3 which have changed code for initialization context of md family (including md4):
https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_to_OpenSSL_3.0_from_OpenSSL_1.0.2
NPM_RELEASE
npm ERR! Linux 3.10.0-327.ali2012.centerOS.x86_64
npm ERR! argv
NPM_RELEASE=”7.5.1” npm版本降级后问题解决
#!/usr/bin/env bash
# npm版本
NPM_RELEASE="7.7.1"