yarn create umi 报错问题

有个项目要使用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就正常了可以安装了

你可能感兴趣的:(react,问题)