Not able to create-react- app

hello all,

I am in lesson 3 in Getting Started, I followed the exact steps to create-react-app, but not able to do so.

I am getting this error -

@indhiras-air react-app % npx create-react-app react-app

Creating a new React app in/react-app/

Installing packages. This might take a couple of minutes.

Installing react, react-dom, and react-scripts…

added 1934 packages, and audited 1935 packages in 45s

125 packages are looking for funding

run npm fund for details

found 0 vulnerabilities
A template was not provided. This is likely because you’re using an outdated version of create-react-app.

Please note that global installs of create-react-app are no longer supported.

You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
@indhiras-air react-app % npm

Please help how to overcome this issue. I followed the same steps as Mosh has mentioned in lesson 3. Thanks

@Indhi To fix the issue, run these commands in sequence

npm init
npm install create-react-app
npx create-react-app myapp

Thank you @Nazmul
I tried the first npm init and then used npm install create-react-app & getting this error

package name: (priya) npm install create-react-app

Sorry, the name can only contain URL-friendly characters.

1 Like

@Indhi Which version of nodejs you are using?
:point_right: Try the v15.3.0 and let me know if you get the same error again.

@Nazmul does this mean your commands will not be using the create-react-app@1.5.2 Mosh was using in his Mastering React course?

@codeknight No! I use nodejs version v15.3.0 and I’m able to create react app. There are many bugs in the latest version of nodejs.

@Nazmul so your create-react-app is the latest version (not Mosh’s suggested v.1.5.2)?
If yes, were you able to finish this Mastering React course without issues?

Confirmed the create-react-app@1.5.2 will not provide the template therefore cannot use the “npm start”.

Solved the issue by installing the latest version of create-react-app and crate the react-app by just running one line of command:
“npx create-react-app myreactapp”
But this means cannot follow Mosh’s course because the app.js and other files are not in v1.5.2 so different with Mosh’s screen.

I had also tried "npx create-react-app@1.5.2 myreactapp"then the template missing again.

@programmingwithmosh kindly advise if necessary. Would be great if can update the content of your React course. Thanks a lot.

@Nazmul will try and let you know

@codeknight were you able to create the app using the steps which you have mentioned and were you able to finish the course? It’s a huge roadblock for me now, as I am not able to proceed due to environment setup. I signed up so that I can learn React…

@Indhi yes i was able to create the app using whatever the latest create-react-app version currently is, but I am not able to finish the ‘Mastering React’ course because the codes from the latest version of create-react-app are a lot different than Mosh’s create-react-app v1.5.2, therefore I am not able to follow his course (Mastering React) since the 3rd video.

@programmingwithmosh do you have plan to update your React (not native) course soon?

@codeknight I use node-v15.3.0 and without any issues I completed Mastering React Course.

@Nazmul What version of create-react-app did you install and use on this Mastering React course?

@codeknight There was no need to create-react-app version it’s all about node js! Again I use the 15.3.0 version of node js.

found the solution here:

@codeknight That’s nice… Enjoy!