Após instalar o npm install quando rodo npm run watch recebo esse log (*abaixo) mas mesmo eu tentando arrumar o json não deu certo. Alguém ai pra ajudar?
Versão Node na maquina: v15.11.0
json arquivo original
{
"name": "app",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.15.1",
"express": "^4.12.3"
}
}
json alterado
{
"name": "app",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"compile": "tsc",
"watch": "tsc -w",
"start": "node server.js \"npm run watch\" \"npm run server\""
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.15.1",
"express": "^4.12.3"
}
}
npm ERR! missing script: watch
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/juniormoraes/.npm/_logs/2021-03-05T14_38_09_589Z-debug.log
0 verbose cli [
0 verbose cli '/usr/local/Cellar/node/15.10.0_1/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli 'run',
0 verbose cli 'watch'
0 verbose cli ]
1 info using npm@7.5.3
2 info using node@v15.10.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/juniormoraes/Angular-projetos/.npmrc Completed in 0ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:/Users/juniormoraes/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 9ms
19 verbose npm-session 3c51bdb19f4116d3
20 timing npm:load Completed in 22ms
21 timing command:run-script Completed in 2ms
22 verbose stack Error: missing script: watch
22 verbose stack at runScript (/usr/local/lib/node_modules/npm/lib/run-script.js:54:11)
23 verbose cwd /Users/juniormoraes/Angular-projetos/Linguagem typescript/projeto-webpack 2
24 verbose Darwin 18.7.0
25 verbose argv "/usr/local/Cellar/node/15.10.0_1/bin/node" "/usr/local/bin/npm" "run" "watch"
26 verbose node v15.10.0
27 verbose npm v7.5.3
28 error missing script: watch
29 verbose exit 1