React course out dated?

im trying to use the create-react-app package.
but it seems that the version that mosh is using (1.5.2) is no longer supported what should i do? did i jut wasted money?

1 Like

I think you need to use “npx create-react-app” instead of npm

3 Likes

Yes the version that mosh using is outdated.
So you need to install the latest version and you don’t need to be worry to get errors through out entire course :wink:

3 Likes

I found a simple fix that you can use to get exactly the same app structure that mosh has:
npm uninstall create-react-app
npm uninstall -g create-react-app
npm install -g create-react-app@1.5.2
create-react-app --help //to check if installed correctly, should return the help info
create-react-app my-app --scripts-version=react-scripts@1.1.4
cd my-app
npm start

5 Likes

just install latest version, you should be fine.

I recommend yarn create react-app <your-app>. “yarn” is faster than “npm”.

1 Like

Hi! I followed your instruction and was able to create the react-app.

But in Mosh’s react course. section 2, lesson 2 on Setting Up the Project where Mosh created a counter-app, i ran into the same problem again…

" 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."

do you know what could be the reason?

Hi,
You must install nodejs first. And then follow this command, example:

npm i -g create-react-app
npx create-react-app first-react-app
cd first-react-app
npm start

Hi! thanks for the reply.
I have already gone through that process and i’ve already created react app
but now I’m supposed to create another app called “counter-app” but it’s not working again

to create another app must do this:

npx create-react-app counter-app
cd counter-app
npm start

yes, I think so that the react course is outdated.

I am following along with mosh and did everything as mosh does
but i’m still facing the same error again and again no matter how much i change my code

{_.get(item, column.path)}
i’m getting error in this line

Error: Objects are not valid as a React child (found: object with keys {_id, name}). If you meant to render a collection of children, use an array instead.

for reference this is my stackoverflow post regarding the same topic.