npx create-react-app拉下以下错误消息
当我尝试创建一个React应用程序时,在命令行中生成以下内容。可能的问题/解决方案是什么?
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.```
The following is generated in the command-line when I try to create a React app. 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.```
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需卸载 node- v14.17.3 并安装最新版本的节点和您'将摆脱这个错误
Just uninstall node- v14.17.3 and install the latest version of node and you'll get rid of this error