使用 npx create-react-app my-app 时,出现此错误:
You are running
create-react-app
4.0.3, which is behind the latest release (5.0.1). 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
我使用了命令 npm uninstall 并查看了 getting started with react
但该链接暗示了相同的过程
npx create-react-app my-app.我也使用了这个命令npm install React React-dom
但是这个
只安装一个节点模块和一个package.json。它不会创建通常的 react 样板
和所有。大家有什么想法,请帮忙。
最佳答案
尝试这个解决方案:
npx create-react-app@latest myApp
关于javascript - 如何使用最新的react版本(react18)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71904638/