create-react-app error
来源:2-5 【TypeScript配置】tsconfig.json详解

Zhang_Kyra
2021-06-16
bash-3.2$ npx create-react-app my-app-ts --template typescript
Creating a new React app in /Users/zxc/A_work/Project/UI/learning/React/my-app-ts.
warning …/…/…/…/…/…/package.json: No license field
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript…
You appear to be offline.
Falling back to the local Yarn cache.
yarn add v1.22.10
warning …/…/…/…/…/…/package.json: No license field
[1/4] 🔍 Resolving packages…
error An unexpected error occurred: “There should only be one folder
in a package cache (got in
/Users/zxc/Library/Caches/Yarn/v6/npm-@babel-helper-annotate-as-pure-7.12.13-0f58e86dfc4bb3b1fcd7db806570e177d439b6ab-integrity/node_modules/@babel)”.
1回答
-
阿莱克斯刘
2021-06-17
可能是你电脑的本地缓存出了问题,试试执行以下命令清除一下local cache
yarn cache clean
022021-06-17
相似问题