简体   繁体   English

npx create-react-app 提取以下错误消息

[英]npx create-react-app pulls the following error message

The following is generated in the command-line when I try to create a React app.当我尝试创建 React 应用程序时,会在命令行中生成以下内容。 what is the possible issue/solution?可能的问题/解决方案是什么?

johnsmith@johnsmith-MacBook-Pro portfolio-projects % npx create-react-app watch-this

Creating a new React app in /Users/johnsmith/Code/portfolio-projects/watch-this.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/johnsmith/.npm/_logs/2022-06-30T16_47_23_299Z-debug-0.log

Aborting installation.
  npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting watch-this/ from /Users/johnsmith/Code/portfolio-projects
Done.```

Just uninstall node- v14.17.3 and install the latest version of node and you'll get rid of this error只需卸载node-v14.17.3并安装最新版本的 node ,您将摆脱此错误

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM