reactjs - 创建反应应用程序时获取包失败
问题描述
我正在尝试使用创建反应应用程序:npx create-react-app my-app
并且我不断收到此错误:
Creating a new React app in /Users/mcohen/Git/andys-tale/andys-blog.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /Users/mcohen/Git/andys-tale/andys-blog has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting andys-blog/ from /Users/mcohen/Git/andys-tale
Done.
有什么建议我该怎么办?
解决方案
删除 yarn.lock 文件 这会有所帮助!
推荐阅读
- ubuntu - MonoDevelop 缺少文件“Microsoft.CSharp.Core.targets”
- r - 允许用户以闪亮的方式上传 shapefile
- javascript - 在同一行的 2 个字段之间添加空格
- arrays - 如何将数据从对象传递给mongo中的其他对象
- java - Android / Firebase 实时数据库 - onChildRemoved 运行每个查询删除
- visual-studio-code - 为什么 vscode 会查看 node_modules 的本地 appdata?
- android - Android Studio - Junit 4 - 在所有测试之前运行代码
- reactjs - 提交表单后reactjs清理输入
- python - 错误auctions.models.Listing.DoesNotExist:列表匹配查询不存在。我刚开始学习 django,我的代码有什么问题?
- git - 为什么 Git 不能为这个分支设置上游?