Estou tentando subir a api mas estou tomando o erro abaixo, e estou usando a versão do node 8.8.9. Utilizo linux ubuntu.
marco@marco-TravelMate:/cursos_alura/angular/api$ node --version
v8.9.0
marco@marco-TravelMate:/cursos_alura/angular/api$ npm install
sqlite3@4.0.0 install /home/marco/cursos_alura/angular/api/node_modules/sqlite3 node-pre-gyp install --fallback-to-build
[sqlite3] Success: "/home/marco/cursos_alura/angular/api/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node" is installed via remote npm WARN alurapic@1.0.0 No description npm WARN alurapic@1.0.0 No repository field. added 233 packages in 7.222s
marco@marco-TravelMate:~/cursos_alura/angular/api$ npm start
alurapic@1.0.0 start /home/marco/cursos_alura/angular/api node server.js
events.js:183 throw er; // Unhandled 'error' event ^
Error: listen EADDRINUSE :::3000
at Object.errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Object. (/home/marco/cursosalura/angular/api/server.js:4:24)
at Module.compile (module.js:635:30)
at Object.Module.extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
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 logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/marco/.npm/logs/2021-05-23T1449_03_493Z-debug.log
O arquivo de log acima contém o conteúdo:
0 info it worked if it ends with ok
1 verbose cli [ '/home/marco/.nvm/versions/node/v8.9.0/bin/node',
1 verbose cli '/home/marco/.nvm/versions/node/v8.9.0/bin/npm',
1 verbose cli 'start' ]
2 info using npm@5.5.1
3 info using node@v8.9.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle alurapic@1.0.0prestart: alurapic@1.0.0
6 info lifecycle alurapic@1.0.0start: alurapic@1.0.0
7 verbose lifecycle alurapic@1.0.0start: unsafe-perm in lifecycle true
8 verbose lifecycle alurapic@1.0.0start: PATH: /home/marco/.nvm/versions/node/v8.9.0/lib/node_modules/npm/bin/node-gyp-bin:/home/marco/cursos_alura/angular/api/node_modules/.bin:/home/marco/.nvm/versions/node/v8.9.0/bin:/opt/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle alurapic@1.0.0start: CWD: /home/marco/cursos_alura/angular/api
10 silly lifecycle alurapic@1.0.0start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle alurapic@1.0.0start: Returned: code: 1 signal: null
12 info lifecycle alurapic@1.0.0start: 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. (/home/marco/.nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/home/marco/.nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stac