1

When creating a new react app via npx create-react-app client, the application is created however the react-scripts command is not found and cannot run the start script. Is there anyway to fix this? [enter image description here

Question 2 Also when running application node <direct path to react-scripts start file> I cannot use the dotenv module as pollyfill is no longer supported for the fs and os modules? Any solutions?

I am using

  • npm version: 8.19.2
  • node version: v16.17.0 enter image description here
  • Why would you run the start file manually (Q2)? Can you show the error output for Q1 along with the command you're using? – JBallin Oct 20 '22 at 06:15
  • Without react-scripts to run the file itself through the package you would have to run it manually to get it to run. This is how I have still been building with react this last week. ```npx create-react-app client``` ```cd client``` ```npm run start``` – Jesse L. Greenough Oct 20 '22 at 07:00
  • Can you make sure you don't have react-scripts or CRA installed globally (npm uninstall -g ...) and then show the output when creating the app? – JBallin Oct 20 '22 at 15:38
  • Related: https://stackoverflow.com/q/40546231/4722345 – JBallin Oct 20 '22 at 15:46

1 Answers1

0

this problem's have multiple problems , maybe you have to create app at desktop or at C disk (if Windows) , try this

  1. rm -rf node_modules
  2. rm -rf package-lock.json
  3. npm install
  4. change node version vie NVM (optional)

Second question check this dotenv-webpack

jalalbmnf
  • 18
  • 5