简体   繁体   English

删除旧的 create-react-app 后如何创建 create-react-app

[英]How to create a create-react-app after deleting an old create-react-app

(base) Dun-Yan:Web development.HTML ongdunyan$ sudo npm uninstall -g create-react-app
Password:

up to date, audited 1 package in 429ms

found 0 vulnerabilities
(base) Dun-Yan:Web development.HTML ongdunyan$ sudo npm install -global create-react-app@17.0.0
npm ERR! code ETARGET
npm ERR! notarget No matching version found for create-react-app@17.0.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ongdunyan/.npm/_logs/2021-11-29T13_27_38_046Z-debug.log
(base) Dun-Yan:Web development.HTML ongdunyan$ 

I have deleted the create-react-app file in vs code and through the terminal of my Mac.我已经通过我的 Mac 终端删除了 vs 代码中的 create-react-app 文件。 Why is there still error and why is my file create-react-app not created为什么仍然有错误,为什么我的文件 create-react-app 没有创建

React and create-react-app are 2 different things React 和 create-react-app 是两个不同的东西

while react is on version 17, create-react-app ( a script for bootstrapping react-apps) is on version 4.0.3虽然 react 在 17 版上,但 create-react-app(用于引导 react-apps 的脚本)在 4.0.3 版上

please run npm I -g create-react-app请运行npm I -g create-react-app

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM