简体   繁体   English

当我在创建 `npx create-react-app my-app` 之后执行 `npm install` 时,当我启动应用程序 `npm start` 时它给我错误

[英]when i do `npm install` after create `npx create-react-app my-app` than its gives me error when i launch application `npm start`

Severity: moderate
Starting the development server...

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 (D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:401:16)      
    at handleParseError (D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:449:10)
    at D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:481:5
    at D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:342:12
    at D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:214:10)       
    at iterateNormalLoaders (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:221:10)       
    at D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:232:2)        
    at Array.<anonymous> (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (D:\extras\meet up app with react\meet-up\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at D:\extras\meet up app with react\meet-up\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
D:\extras\meet up app with react\meet-up\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 (D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:401:16)
    at D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:433:10
    at D:\extras\meet up app with react\meet-up\node_modules\webpack\lib\NormalModule.js:308:13
    at D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (D:\extras\meet up app with react\meet-up\node_modules\loader-runner\lib\LoaderRunner.js:111:13)     
    at D:\extras\meet up app with react\meet-up\node_modules\babel-loader\lib\index.js:51:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.10.0 Node.js v18.10.0

i have tried for again intalling node_moduls and npm audit fix --force我已经尝试再次安装 node_moduls 和npm audit fix --force

Uninstall and reinstall react-scripts卸载并重新安装反应脚本

  1. open the terminal and run npm uninstall react-scripts打开终端并运行npm uninstall react-scripts
  2. run npm install react-scripts运行npm install react-scripts

Manually change the react script version手动更改反应脚本版本

  1. go to your package.json and change the react-script version to 5.0.2 go 到您的package.json并将react-script版本更改为5.0.2
  2. delete the node_modules folder by running rm –rf node_modules通过运行rm –rf node_modules删除node_modules文件夹
  3. delete the package.lock.json file by running rm –rf package.lock.json通过运行rm –rf package.lock.json删除package.lock.json文件
  4. run npm install运行npm install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在创建反应项目时在“npx create-react-app my-app”之后运行命令“npm start”时出错 - getting error when run command 'npm start' after 'npx create-react-app my-app' in creating a react project 每次我运行 npx create-react-app my-app 它都会在 npm start 后显示这个 html webpack 错误 - Every time i run npx create-react-app my-app it shows this html webpack error after npm start 如果我运行命令 npm install create-react-app my-app,我继续收到错误 - If I run the command npm install create-react-app my-app, I keep on receiving Error 运行 npx create-react-app my-app 时出错 - Error when I run npx create-react-app my-app npx create-react-app 在运行 npm 启动时出错 - npx create-react-app gives error when running npm start 在运行“create-react-app my-app”后尝试运行“npm start”时出现一堆错误 - Get a bunch of errors when trying to run “npm start” after running “create-react-app my-app” 使用 npx create-react-app 创建应用后<myproject> ,并使用“npm start”启动应用程序我得到了下面提到的这个错误</myproject> - After creating app using npx create-react-app <myproject> , and start app by using "npm start" i got this error mentioned below `npx create-react-app my-app` 正在尝试使用错误的 npm - `npx create-react-app my-app` is trying to use the wrong npm 我正在使用“npx create-react-app”创建一个新的 reactjs 应用程序,当它完成并尝试使用“npm start”运行它时,我收到一个错误 - I'am creating a new reactjs application using “ npx create-react-app” , and when it's done and trying to run it using “npm start” , I get an error 使用 npx create-react-app my-app 时出错 - Error when using npx create-react-app my-app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM