I created a react project with the 'npx create-react-app my-app' command before and the 'my-app' folder contains this files and folders:
my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
└── serviceWorker.js
└── setupTests.js
But now when I create a react project with the same command, the 'my-app' folder contains only 'node_modules' folder and 'package.json' 'yarn.lock' files.
my-app
├── node_modules
├── yarn.lock
└── package.json
I thought probably for using an outdated version of create-react-app, then to fix this, I did the following steps:
- Removing the old version of CRA by running
npm rm -g create-react-app
- Installing the new version globally by running
npm install -g create-react-app
But my issue still existed. The last thing that came to my mind was upgrading node.js from v10 to v12.16.3, but nothing didn't change.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…