简体   繁体   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

It's been many days that I am completely stuck and not able to create a react app.已经有很多天了,我完全被卡住了,无法创建一个反应应用程序。 I went through many Stakeoverflow conversations and tried in different ways but I keep on getting error messages: erro404 or error code1 or a template was not provided, and never succeed to create a template.我经历了许多 Stakeoverflow 对话并尝试了不同的方式,但我不断收到错误消息:erro404 或错误代码1 或未提供模板,并且从未成功创建模板。 I've uninstalled and reinstalled Node version 16.13.1, my npm version is 8.1.2.我已经卸载并重新安装了 Node 版本 16.13.1,我的 npm 版本是 8.1.2。 I've tried:我试过了:

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

I also checked the npm status on https://status.npmjs.org/ and everything looks normal.我还检查了https://status.npmjs.org/上的 npm 状态,一切正常。 I don't know what else to try.我不知道还能尝试什么。 Do you have any idea of how I can fix it?你知道我该如何解决吗?

I think you misread the syntax for the command line arguments.我认为您误读了命令行 arguments 的语法。 From CRA :来自加拿大税务局

You can now optionally start a new app from a template by appending --template [template-name] to the creation command.您现在可以通过将 --template [template-name] 附加到创建命令来选择从模板启动新应用程序。

暂无
暂无

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

相关问题 无法使用npx create-react-app安装react应用。 节点引擎“节点”与此模块不兼容 - Can't install react app using npx create-react-app. Node The engine “node” is incompatible with this module 当我尝试创建 React 应用程序时,出现“未提供模板,这可能是因为您使用的是过时版本的 create-react-app”错误 - when i try to create react app ,i get " template was not provided ,This is likely because you're using an outdated version of create-react-app " Error 成功安装 create-react-app 后 Npm 启动将无法正常工作。 错误代码 Enoent 错误编号 -4058 - Npm start won't work after successfully installing create-react-app. Error code Enoent Error number -4058 &#39;npx create-react-app [name] --template typescript&#39; 错误 - 'npx create-react-app [name] --template typescript' error React Js,npx create-react-app 上未提供模板<app name></app> - React Js, Template Not Provided On npx create-react-app <app name> 每次我想创建一个反应应用程序时都会收到这个错误: - Im getting this error everytime time I want to create a react app: 如何修复错误:未指定默认引擎且未提供扩展名。 在我的 Express 应用程序中? - How do I fix Error: No default engine was specified and no extension was provided. In my Express App? 运行 npm install create-react-app 时出现错误 404 - Getting Error 404 while running npm install create-react-app 使用 npx create-react-app 时收到此错误消息 - Getting this error messages when using npx create-react-app 无法将 Axios 的 404 错误发布到 Create React App 上的 Express 服务器 - Cannot POST 404 error with Axios to Express server on Create React App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM