When I run npm start, I get the dreaded "npm ERR! missing script: start"
Already tried changing the "start" line in the package.json in every way shown here and on Google going back a full year.
Also tried installing just about every stable node/npm stable release from the current to 12.x. Deleted yarn just to be sure. Wnet back to current release.
Ran everything from npm init to npm create-react-app [project folder] node_modules are there.
The script for run does show up in the package.json.
Deleted the project directory,deleted the repository and re-cloned the depository fresh.
OS: Linux Mint 19.1 Cinnamon Linux Mint 19.1 is based on Ubuntu 18.04.1 Vs Code 1.37.1 - all extensions disabled.
$ npm -v
6.9.0
$ whereis node
node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz
$ which npm
/usr/bin/npm
*******************************************
*package.json*:
{
"main": "index.js",
"name": "team-builder",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "3.1.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"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"
]
}
}
- Note: I've tried every variant of the start script posted here in the past year.
debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/mark/.npmrc. (matches
userconfig)
5 verbose stack Error: missing script: start
5 verbose stack at run (/usr/lib/node_modules/npm/lib/run-
script.js:155:19)
5 verbose stack at /usr/lib/node_modules/npm/lib/run-
script.js:63:5
5 verbose stack at /usr/lib/node_modules/npm/node_modules/read-
package-json/read-json.js:115:5
5 verbose stack at /usr/lib/node_modules/npm/node_modules/read-
package-json/read-json.js:418:5
5 verbose stack at checkBinReferences_
(/usr/lib/node_modules/npm/node_modules/read-package-json/read-
json.js:373:45)
5 verbose stack at final
(/usr/lib/node_modules/npm/node_modules/read-package-json/read -
json.js:416:3)
5 verbose stack at then
(/usr/lib/node_modules/npm/node_modules/read-package-json/read-
json.js:160:5)
5 verbose stack at ReadFileContext.<anonymous>
(/usr/lib/node_modules/npm/node_modules/read-package-json/read-
json.js:3 32:20)
5 verbose stack at ReadFileContext.callback
(/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-
fs.js:90:16)
5 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete]
(fs.js:237:13)
6 verbose cwd /home/mark/OneDrive/Repositories/team-builder
7 verbose Linux 4.15.0-58-generic
8 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
9 verbose node v10.16.3
10 verbose npm v6.9.0
11 error missing script: start
12 verbose exit [ 1, true ]
I've tried just about everything. I hope you all can help. npm start won't run, so I'm basically coding blind - nothing to the monitor, no Chrome React devTools.