I'm encountering the error below:
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\..\AppData\Roaming\npm-cache\_logs\2019-04-27T18_02_39_6
60Z-debug.log
This is my situation - I have the following code in my package.json file:
{
"name":"javaScript-blockchain",
"version":"1.0.0",
"description":"",
"main":"index.js",
"scripts": {
"test":"echo \"Error:no test specified\" && exit 1",
"start":"node dev/api.js"
},
"author":"Samrat Roy Chowdhuri",
"license":"ISC",
"dependencies":{
"express":"^4.16.3",
"nodemon":"^1.17.3",
"sha256":"^0.2.0"
}
}
When I run npm start in Node prompt, I receive the error mentioned above
The log provides the following information:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7e100e133e48504a504f">[email protected]</a>
3 info using <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d434249486d5b1c1d031c18031e">[email protected]</a>
4 verbose stack Error: missing script: start
4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:63:5
4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:418:5
4 verbose stack at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:373:45)
4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:416:3)
4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:160:5)
4 verbose stack at ReadFileContext.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:332:20)
4 verbose stack at ReadFileContext.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:237:13)
5 verbose cwd E:\programs\blockchain
6 verbose Windows_NT 6.1.7601
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
8 verbose node v10.15.3
9 verbose npm v6.4.1
10 error missing script: start
11 verbose exit [ 1, true ]
Please advise on where I may have made a mistake