0
点赞
收藏
分享

微信扫一扫

启动项目报错:digital envelope routines::unsupported解决

最近写reacte的项目,在其他电脑下载依赖启动项目时候报错:

Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
  xxxxxxx....

Node.js v18.17.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

主要是node17版本问题引起的问题,解决方式

  1. 第一种是降低node版本,使用node17以下版本
  2. 第二种在启动命令加语句命令`set NODE_OPTIONS=--openssl-legacy-provider &`

"scripts": {
    "start": "set NODE_OPTIONS=--openssl-legacy-provider & react-scripts start",
  },

改好之后直接启动项目

npm/pnpm run start || yarn 


举报

相关推荐

0 条评论