在node 版本为v18.12.0环境下运行 pnpm start 程序项目,编译的时候报错,node版本为v16.17.0可正常运行
报错内容如下: 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 (/Users/jiangxin/project_git/chiyou/examples/slave-systemnotice-index-app/node_modules/.pnpm/@umijs+deps@3.5.34/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:184154:18) at BulkUpdateDecorator.update (/Users/jiangxin/project_git/chiyou/examples/slave-systemnotice-index-app/node_modules/.pnpm/@umijs+deps@3.5.34/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:184055:50) at /Users/jiangxin/project_git/chiyou/examples/slave-systemnotice-index-app/node_modules/.pnpm/@umijs+deps@3.5.34/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:107101:9 at /Users/jiangxin/project_git/chiyou/examples/slave-systemnotice-index-app/node_modules/.pnpm/@umijs+deps@3.5.34/node_modules/@umijs/deps/compiled/webpack/5/bundle5.js:33829: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' }
📷 复现步骤 | Recurrence steps将node运行环境切成v18.12.0可复现
按照官方使用教程通过pro create myapp
创建项目,使用pnpm安装依赖,通过pnpm start
启动项目
可以在node=v18.12.0 版本下正常启动
💻 复现代码 | Recurrence code无
© 版本信息- Ant Design Pro 版本: [e.g. 5.2.0]
- umi 版本 3.5.0
- 浏览器环境 chrome 107
- 开发环境 12.5.1 (21G83)