0

I keep getting:

C:\AppData>npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\AppData\Roaming\npm-cache\_logs\2019-02-28T18_08_25_285Z- 

debug.log

My package file is as follows:

{
"name": "first",
 "version": "0.1.0",
"private": true,
 "dependencies": {
 "react": "^16.8.3",
"react-dom": "^16.8.3",
"react-scripts": "2.1.5"
   },
   "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
   "eject": "react-scripts eject"
 },
 "eslintConfig": {
   "extends": "react-app"
 },
 "browserslist": [
"cover 99.5%",
"not dead",
"not ie <= 11",
"not op_mini all"
   ]
 }

I'm new to npm, and when I first downloaded it, I was able to start it up on my local server no problem.

I wanted to switch my browser up, and in doing so, suddenly npm start is having an issue.

I know there are other questions similar, but none of them alleviate my issue.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Ewubbs
  • 21
  • 7

2 Answers2

1

As @Arfeo said, just call npm run start.

  • Call `npm install` then `npm run start`. –  Feb 28 '19 at 19:34
  • @Ewubbs it is not possible if you run `npm run start` from within the directory where your `package.json` is located. IF ONLY this error is not about `react-scripts start`. Haha. Try executing `react-scripts start`?.. – Arfeo Feb 28 '19 at 20:04
1

Where is your package.json located?

If your answer is, for example, c:\AppData\Eugene\react-app you need to change directory (only once),

cd c:\AppData\Eugene\react-app

then run your npm commands

npm start
npm run build

, etc.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Tudor Ilisoi
  • 2,934
  • 23
  • 25