小编For*_*lor的帖子

npx create-react-app 提示全局卸载不存在的 create-react-app 包?

我在涉及全局安装的 npx create-react-app 方面遇到问题。我感到困惑,因为据我所知,我的机器上没有安装 create-react-app 包。

一些细节:

我启动了一个反应项目(使用打字稿模板),就像我之前和最近在同一台机器上多次完成的那样:

npx create-react-app --template typescript .

我从终端收到此提示

Need to install the following packages: create-react-app Ok to proceed? (y)

我按 y 确认可以继续。(如果我按 n,进程将终止并出现以下错误:npm ERR! canceled。)然后终端显示以下消息

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for …
Run Code Online (Sandbox Code Playgroud)

typescript reactjs yarnpkg npx

51
推荐指数
4
解决办法
2万
查看次数

标签 统计

npx ×1

reactjs ×1

typescript ×1

yarnpkg ×1