每当我使用命令 npm run start 在 reactjs 中启动开发服务器时,开发服务器都会启动,相反,它会给我一个错误

whenever i start the development server in reactjs by using the command npm run start the development server dosent start instead it gives me an error

提问人:Aaron Tauro 提问时间:1/3/2023 最后编辑:FiddlingAwayAaron Tauro 更新时间:1/3/2023 访问量:88

问:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\util\\createHash.js:135:53)
    at NormalModule.\_initBuildHash (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:417:16)
    at handleParseError (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:471:10)
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:503:5
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:358:12
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:221:10)
C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\react-scripts\\scripts\\start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\util\\createHash.js:135:53)     
    at NormalModule.\_initBuildHash (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:417:16)
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:452:10
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\webpack\\lib\\NormalModule.js:323:13
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:367:11
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:233:18
    at context.callback (C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\loader-runner\\lib\\LoaderRunner.js:111:13)
    at C:\\Complete web development bootcamp\\React Course\\textutils\\node_modules\\babel-loader\\lib\\index.js:59:103 {
  opensslErrorStack: \[ 'error:03000086:digital envelope routines::initialization error' \],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

我尝试编辑更改代码,甚至尝试过 ChatGPT,但仍然没有得到任何解决方案。我什至删除了 node_modules 文件夹并重新安装了它。我期待开发服务器启动,但仍然没有

javascript reactjs 编译器错误 运行时 语法错误

评论

0赞 FiddlingAway 1/3/2023
完全卸载节点(不仅仅是模块)、重新启动机器、再次安装节点、安装所需的模块等怎么样?
0赞 Dave Newton 1/3/2023
stackoverflow.com/questions/69692842/......
0赞 Aaron Tauro 1/3/2023
谢谢你分享这篇文章戴夫。我安装了nodejs(16.9.0)版本,我的开发服务器现在工作正常。

答: 暂无答案