skip to Main Content

I’m contributing to a task assigned to me to build a download page for our community web app and i have done some things already but I have being trying to npm start or npm run build to see what i’m doing so far but my terminal keeps displaying this error

I have tried to install react-scripts but is not still working

2

Answers


  1. To fix this , first check your package.json file and see if react-scripts is listed as one of the dependencies in your project.If package is listed do

    npm install
    
    

    if react-script is not listed do

    npm install react-scripts
    
    
    Login or Signup to reply.
  2. I ran into this recently (not sure what suddenly triggered the error), and the below worked for me.

    1. Clean install with ‘npm ci‘,
      more info at (https://docs.npmjs.com/cli/v9/commands/npm-ci)
    2. Installed latest react-scripts ‘npm i react-scripts@latest
    3. Added a devDependencies folder with react scripts to my package.json file as below (I kept it in my dependencies folder as well just in case):
      "devDependencies": {
      "react-scripts": "5.0.1"
      }
      ,
      More Info: (https://create-react-app.dev/)
    4. npm run build
    5. npm start
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search