1
votes

I am having trouble with creating a react app (windows)

NPM Version: 6.14.11

Node version: 14.15.4

Whenever I run npx create-react-app my-app I am missing the folders that are usually created. I have my node_modules folder and my package and package-lock JSON files, but I am missing everything else (missing src, public, etc).

When I try to run npm start, the script isn't found.

I have already read the Getting Started guide where it says to try npm uninstall -g create-react-app and I have already updated npm and node. I still cannot get these folders to populate. Any ideas?

1
Try 1. Using administrator rights when using the cmd, 2. Use Yarn package manager instead when using npx create-react-app 3. Set up a react project from scratch using Webpack, Babel, React and React-Router-Dom - Pedro Uzcátegui
Hey @c_the_b, I know you use npm uninstall -g create-react-app but may try using this command npm rm -g create-react-app then installing it again - ousecTic
Do you get a error of some kind? - PalPalash
HenryLy, I tried this and same result. @PalPalash I get the error "missing script: start" which initially makes sense because the package.json file that gets created does not contain a Scripts section, but even after copying the code from a previous app I made, I get the same result. I also tried copying the entire package.json file itself from the working app into this one and I get the same result. - c_the_b
@c_the_b try installing it by npm i -g create-react-app and running create-react-app <yourProjectname> - PalPalash

1 Answers

0
votes

Maybe you didn't run npm start in the right folder.

You should run npm start in the same folder with package.json.