我正在尝试使用npx create-react-app my-app创建创建应用
我有npm 6.13
和节点:12.14.1
我厌倦了跟随create-react-app doesn't generate public and src folders thus cannot get started
中的灵魂但是它不起作用吗?
有机会吗?
我正在尝试使用npx create-react-app my-app创建创建应用
我有npm 6.13
和节点:12.14.1
我厌倦了跟随create-react-app doesn't generate public and src folders thus cannot get started
中的灵魂但是它不起作用吗?
有机会吗?
您可能已经在全局安装了create-react-app。但npx始终使用最新版本的create-react-app。请通过
检查create-react-app版本create-react-app -v
,并通过检查Changelog.md确保其最新。如果不是,请尝试通过
卸载全局软件包sudo npm uninstall -g create-react-app
确保已全局卸载,然后尝试运行
npx create-react-app <project_name>
,
最初尝试使用,但不起作用:npm rm -g create-react-app
,npm install -g create-react-app
,npx create-react-app <your-app-name>
。
以下命令有效:npx --ignore-existing create-react-app <Your-AppName>