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)”.
React18 精讲 + 结合 TS 实战 + 热门业务开发,获取必备技能
了解课程