Ous*_*khi 21 npm reactjs create-react-app
当我运行以下命令时,我在使用CRA创建新的 React 应用程序时遇到问题npx create-react-app my-app。
npm cache clean --forcenpm -g uninstall create-react-app 我的节点版本是v14.15.3,npm 版本是7.10.0
我得到的错误是:
Need to install the following packages:
create-react-app
Ok to proceed? (y)
Run Code Online (Sandbox Code Playgroud)
小智 44
需要清除npx上的缓存:
npx clear-npx-cache
Run Code Online (Sandbox Code Playgroud)
然后重新运行
npx create-react-app <app-name>
Run Code Online (Sandbox Code Playgroud)
然后接受(y)
小智 16
刚刚遇到了同样的问题。这对我有用:
npm i -g yarn
yarn create react-app
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13710 次 |
| 最近记录: |