yarn create umi 报错问题

13 篇文章 0 订阅

有个项目要使用umi,决定采用umi的脚手架方式创建项目,这样能省不少事,虽然不应该被提倡。但是出现线面的问题

PS F:\data-train> yarn create umi
yarn create v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "C:\\Users\\工号\\AppData\\Local\\Yarn\\Cache\\v6\\npm-doctrine-2.1.0-5cd01fc101621b42c4cd7f5d1a66243716d3f39d-integrity\\node_modules\\doctrine\\.yarn-metadata.json: Unexpected end of JSON input".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\工号\\AppData\\Local\\Yarn\\Data\\global\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
PS F:\data-train> npm create umi
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Data\npm-cache\_npx\13476" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     d:\user\工号\Application Data\npm-cache\_logs\2019-12-21T09_22_57_009Z-debug.log
安装 create-umi@latest 失败,错误代码:1

error An unexpected error occurred: "C:\\Users\\工号\\AppData\\Local\\Yarn\\Cache\\v6\\npm-doctrine-2.1.0-5cd01fc101621b42c4cd7f5d1a66243716d3f39d-integrity\\node_modules\\doctrine\\.yarn-metadata.json: Unexpected end of JSON input".中的\\改为\之后找到了.yarn-metadata.json这个文件,将其删除了重新执行yarn create umi就正常了可以安装了

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值