繁体   English   中英

我无法使用 create-react-app 创建模板。 收到错误消息:未提供模板。 或错误 404

[英]I can't create a template using create-react-app. getting the error message: a template was not provided. or ERROR 404

已经有很多天了,我完全被卡住了,无法创建一个反应应用程序。 我经历了许多 Stakeoverflow 对话并尝试了不同的方式,但我不断收到错误消息:erro404 或错误代码1 或未提供模板,并且从未成功创建模板。 我已经卸载并重新安装了 Node 版本 16.13.1,我的 npm 版本是 8.1.2。 我试过了:

npm uninstall -g create-react-app 
npm install -g create-react-app
npm cache clean 
npm rebuild 
npm cache clean --force
npx clear-npx-cache
npm audit npm audit fix
npx create-react-app my-app --template[template-name]
npm config set registry http://registry.npmjs.org 
sudo npm i -g create-react-app

我还检查了https://status.npmjs.org/上的 npm 状态,一切正常。 我不知道还能尝试什么。 你知道我该如何解决吗?

我认为您误读了命令行 arguments 的语法。 来自加拿大税务局

您现在可以通过将 --template [template-name] 附加到创建命令来选择从模板启动新应用程序。

暂无
暂无

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

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