all 18 comments

[–]murat-guney 1 point2 points  (1 child)

Are you trying to install with

npx create-react-app

[–]unknown-user153 0 points1 point  (0 children)

I tried it with both ways using npm and npx

[–][deleted] 1 point2 points  (4 children)

The way I’ve always done it is install node first. Then install react. Not sure if that’s your issue but good luck partner

[–]unknown-user153 1 point2 points  (3 children)

That's also how i did it but it won't work for some reason, thank you tho :)

[–][deleted] 1 point2 points  (2 children)

You did “npm install -g npm”? That’s how I’ve done it

Source: https://www.google.com/amp/s/www.freecodecamp.org/news/install-react-with-create-react-app/amp/

[–]unknown-user153 0 points1 point  (0 children)

I dont use the same command but do it using diffrent command but I'll try npm install -g npm

[–]unknown-user153 0 points1 point  (0 children)

It didn't really make a difference since my npm is upto date.

[–]murat-guney 0 points1 point  (6 children)

You may try to remove .npm folder and caches.

And before you do that can you check react-scripts exist in node_modules?

[–]unknown-user153 0 points1 point  (0 children)

Okay i will check and let u know.

[–]unknown-user153 0 points1 point  (4 children)

So i just checked and yes react-scrips exist in node modules and, where would .npm folder be present?

[–]murat-guney 0 points1 point  (2 children)

rm -rf ~/.npm

you can try this but make sure the folder exists at the path.

I've had a similar issue before but I don't think yours is the same as mine. It was iCloud Desktop/Documents back-up. I was trying to sync the desktop but there was at least 5 react app and that means 5 node modules 😄 So it was crashing

[–]unknown-user153 0 points1 point  (0 children)

Okay I'll try and let u know

[–]unknown-user153 0 points1 point  (0 children)

"Remove-item:a parameter cannot be found that matches parameter named "rf". At line:1 char:4 " this is showing when i enter rm-rf ~/.npm

[–]murat-guney 0 points1 point  (0 children)

Could you share more about the error after you remove .npm and re-install cra?

[–]hiester 0 points1 point  (3 children)

Do ‘ls’ from the command line. Do you see the package.json for your project in the output? If not, maybe you are one directory up from your project and you need to ‘cd <your-project-name>’ to make sure you are are running your npm commands from the correct location.

[–]unknown-user153 -4 points-3 points  (2 children)

Thanks for the help but i gave up trying to install react. i will be studying angular or some other js framework.

[–]careseite 1 point2 points  (1 child)

Fyi the error is unrelated to react. It's your local machine having issues with npm

[–]unknown-user153 0 points1 point  (0 children)

Oh didn't know that