Error: error:0308010C:digital envelope routines::unsupported
个人通过案1解决了问题
案1:将 --openssl-legacy-provider 传递给 Webpack 或 CLI 工具
package.json
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts --openssl-legacy-provider test",
"eject": "react-scripts --openssl-legacy-provider eject"
案2:使用Node JS的LTS版本
考虑将你的Node版本降级到16或其他LTS版本。
目前个人的Node.js版本是v18.15.0,你可以从Node JS官方网站下载它,或者使用NVM来安装。