React App: Why I get an error when I try to run npm start script?


I installed all required packages and trying to run npm start script which gives me the error below:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:118:11)
    at Object.join (path.js:375:7)
    at noopServiceWorkerMiddleware (C:\Alex\Practise\React website\front-end\node_modules\react-dev-utils\noopServiceWorkerMiddleware.js:14:26)
    at Layer.handle [as handle_request] (C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\index.js:317:13)
    at C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\index.js:275:10)
    at launchEditorMiddleware (C:\Alex\Practise\React website\front-end\node_modules\react-dev-utils\errorOverlayMiddleware.js:20:7)
    at Layer.handle [as handle_request] (C:\Alex\Practise\React website\front-end\node_modules\express\lib\router\layer.js:95:5)

Here's copy of my package.json:

  "name": "front-end",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "node-sass": "^4.13.1",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-scripts": "3.3.1"
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  "eslintConfig": {
    "extends": "react-app"
  "browserslist": {
    "production": [
      "not dead",
      "not op_mini all"
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"

I tried to delete and reinstall the whole project, reinstall node and packages with no luck. Any help is very appreciated!


Upgrade your react-scripts to 3.4.0. I've just installed modules provided from your package.json and upgraded react-scripts to the newest version and everything works fine.

More details on github issue.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment


error when i try to run app on emulator android studio

Why do I get an error for "__CrtGetFileInformationByHandleEx " when I try to compile

Why I get error when I try to create stored procedure?

When i try to create react project i get error

Why I get "ImportError" only when I run a python script?

When I run "npm start" to run a React app , it doesn't give any errors but hangs forever instead

I just cloned a react app to my local computer from github, but when I go to run an npm start on it, I get this error:

Why I get an error when I try to deploy a react app to GitHub Pages?

npm start command not working, when I try to run my React application

React - Firebase module error when i try to import 'firebase/app'

I am trying to make a GUI for a app I am working on but when I try print a global variable I get an error. Why?

When I try to run "rails s" or "rails server" command I get an error and It does not let me start the server

Node JS error when I run 'npm start', maybe KrakenJS?

Problems when I try to run npm

When I run npm run start I get this error

Why I get this error on laravel project and npm run watch?

Why is It happining this error when I run the app?

Why I get error when I try to install pyaudio?

I get a buch of errors when i try to run the npm run build command

NPM ERR! CODE EINTEGRITY when i run create react app

Why do I get an error when I use 'source' to run a TCL script?

Why I get error 404 in bcrypt when I run npm install?

Lua: I get error when I try to run a script in Windows

Is there a way to get rid of the syntax error when I run try and except?

Why I get error when I try to declare local variable?

Why I get an error when I try to upload a picture

When I try to run the npm in the terminal, it showing the error

Why am I getting an error when trying to install and run npm?

Why does this simple React component throw an error when I try to run it?

TOP Ranking