Boa tarde,
já tentei as soluções propostas, mas sem êxito. Estou com um erro parecido ao tópico 412 Precondition Failed, do Cesar Giupponi Paiva. Porém segui as orientações do post do github, mas sem sucesso também.
Quando rodo os comandos no prompt, aparecerem os seguintes erros:
C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\server>npm install
npm WARN alurapic@1.0.0 No description
npm WARN alurapic@1.0.0 No repository field.
audited 108 packages in 2.723s
found 12 vulnerabilities (5 low, 2 moderate, 5 high)
run `npm audit fix` to fix them, or `npm audit` for details
C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\server>npm start
> alurapic@1.0.0 start C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\s
erver
> node server.js
Banco data.db pronto para uso
C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\client
events.js:167
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Server.setupListenHandle [as _listen2] (net.js:1327:14)
at listenInCluster (net.js:1375:12)
at Server.listen (net.js:1462:7)
at Object.<anonymous> (C:\Users\Renato\Desktop\alura\angular\angular 2 parte
1\server\server.js:5:24)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
Emitted 'error' event at:
at emitErrorNT (net.js:1354:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:11)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alurapic@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alurapic@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
Daí, vou até a pasta de logs e o arquivo contém o seguinte erro:
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 npm@6.1.0
3 info using node@v10.4.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle alurapic@1.0.0~prestart: alurapic@1.0.0
6 info lifecycle alurapic@1.0.0~start: alurapic@1.0.0
7 verbose lifecycle alurapic@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle alurapic@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\server\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files\Microsoft VS Code\bin;C:\Users\Renato\AppData\Roaming\npm
9 verbose lifecycle alurapic@1.0.0~start: CWD: C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\server
10 silly lifecycle alurapic@1.0.0~start: Args: [ '/d /s /c', 'node server.js' ]
11 silly lifecycle alurapic@1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle alurapic@1.0.0~start: Failed to exec start script
13 verbose stack Error: alurapic@1.0.0 start: `node server.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid alurapic@1.0.0
15 verbose cwd C:\Users\Renato\Desktop\alura\angular\angular 2 parte 1\server
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.4.1
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error alurapic@1.0.0 start: `node server.js`
22 error Exit status 1
23 error Failed at the alurapic@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Alguém pode me ajudar?