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

Viewed 168

It's been many days that I am completely stuck and not able to create a react app with npx create-react-app my-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. I've uninstalled and reinstalled Node version 16.13.1, my npm version is 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 . I don't know what else to try. Do you have any idea of how I can fix it?

1 Answers

I think you misread the syntax for the command line arguments. From CRA:

You can now optionally start a new app from a template by appending --template [template-name] to the creation command.

Related