0

I have run create-react-app in the past couple months, without event. This time however, it appeared to run like normal (see screenshot 1 below), but when I went to npm start it said there was no template. I googled the error & it said that there was a new version of create-react-app & that npm -g create-react-app was no longer supported. I landed on this stack overflow article which said that I had to uninstall in order to run 'npx create-react-app my-app' & get the current version. That threw an error that I didn't have permissions. Node modules was assigned to the root, not me the user. So I googled how to change the permission & landed on this question. When I ran 'sudo chown -R MYUSERNAME: /usr/local/lib/node_modules' it changed 3 of 4 node modules folders from 'root' to me. See the 3rd screenshot in the image below. I tried to, at this point run 'npx create-react-app my-app'. It did its thing, but when I try to 'npm start' it throws a new error (see screenshot 2 below). When I follow the debug log I get screenshot 4 below. I am at my wits end here. Let me know what I'm missing. I thought I changed the permissions so I could clear it, but it says I didn't. I feel like I'm losing my mind here.

This is what happens when I run create-react-app & what happens when I run it, & a permissions log

thewly
  • 11
  • 1
  • Can we see your `package.json`? – Tim Feb 27 '20 at 02:59
  • i think you are out of your project folder i.e.command not found package.json file Or run your cmd as an adminstrator – PRADEEP GORULE Feb 27 '20 at 04:42
  • Tim here you go: { "name": "my-app", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.13.0", "react-dom": "^16.13.0", "react-scripts": "3.4.0" } } – thewly Feb 27 '20 at 13:46
  • PRADIP GORULE I ran the install the same way I've run it in the past. Usually I run create-react-app, then I go into the folder, then run npm start. This time it's not working. – thewly Feb 27 '20 at 13:47

0 Answers0