Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

603
Views
npm start fails after creating a new react project using create-react-app

I'm having some trouble with react-scripts after creating a new react project. I created/initialised the project using npx create-react-app dashboard. After going inside the dashboard folder and running npm start (without doing anything else beforehand), I get the following error:

>npm start
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> dashboard@0.1.0 start
> react-scripts start

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.

I have checked the package.json file and it does have react-scripts listed (v5.0.1, full package.json below) and checking the node_modules folder shows a react-scripts folder there and react-scripts files (cmd, ps1 and 1 with no extension) inside the .bin folder too.

I've tried clearing the npm cache (npm cache clean -f), installing things again (deleting package-lock.json and node_modules folder then running npm install) and nothing seems to change.

I've also tried running npm start in command prompt, powershell and powershell as an admin. I've also tried restarting my PC and retrying too without any luck.

Specs:
Edition: Windows 10 Pro
Version: 21H2
OS build: 19044.1766
Experience  Windows Feature Experience Pack: 120.2212.4180.0
Node JS version: 16.15.1
npm version: 8.11.0

full package.json:

{
  "name": "dashboard",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.3.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

If anyone has any ideas on how to fix this, I'd appreciate the help. Let me know if you need/want any more info that might help debug this issue

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As suggested in this comment: https://stackoverflow.com/a/68394617/2371266, running npm config set script-shell powershell seems to have worked. I tried deleting the script-shell config afterwards and retrying and got the original error again so I'm assuming it is defaulting to something else and that's making things freak out a bit. I guess I'll just keep it pointed at powershell for now.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!