1

Today I decided to create a react app, a task in which I have done a number of times, and after running the create-react-app command in my terminal: I navigated into my new project directory, installed some dependencies I knew I would need, lastly I ran npm start and to my surprise -- nothing happened. Not only is npm start not working, none of the scripts in my package.json file are executing and are completely unresponsive. Furthermore, all executable scripts in all of my React projects have failed to execute since this error has risen.

Last week I was having some trouble installing sqlite3 and had to perform a lot of maintenance in order to get use it in my project; perhaps I deleted a file that is needed in npm that runs scripts? I'll leave a reference to my package.json file below, although I have not altered it much at all.

{
  "name": "maps",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "cors": "^2.8.5",
    "errorhandler": "^1.5.1",
    "morgan": "^1.9.1",
    "node-fetch": "^2.6.0",
    "react": "^16.11.0",
    "react-dom": "^16.11.0",
    "react-scripts": "3.2.0",
    "sqlite3": "^4.1.0",
    "body-parser": "^1.19.0",
    "express": "^4.17.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test"
  },
  "proxy": "http://localhost:3001",
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Thank you in advance to the whiz who fixes this!

Edit: The following is a list of solutions in which I have tried.

  • installed the latest create-react-app globally
  • installed the latest npm and node globally
  • deleted node_modules and reinstalled all dependencies using npm i in my project directory
  • checking that my scripts.test in my package.json file is set appropriately

1 Answers1

0

Perform the following steps:

  1. Delete the node_modules folder from your project directory
  2. run the command npm install in the project directory
  3. run npm start in the project directory
RobC
  • 22,977
  • 20
  • 73
  • 80
shubham
  • 414
  • 2
  • 3