启动项目报错:digital envelope routines::unsupported解决
  OxxiMvcEANtK 2023年11月08日 13 0

最近写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 


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

OxxiMvcEANtK