Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro api npm start/install

PS C:\Users\Akuma\Desktop\alurapic\api-windows> npm start

alurapic@1.0.0 start C:\Users\Akuma\Desktop\alurapic\api-windows node server.js

internal/modules/cjs/loader.js:628 throw err; ^

Error: Cannot find module 'express' Require stack:

  • C:\Users\Akuma\Desktop\alurapic\api-windows\config\express.js
  • C:\Users\Akuma\Desktop\alurapic\api-windows\server.js at Function.Module.resolveFilename (internal/modules/cjs/loader.js:625:15) at Function.Module.load (internal/modules/cjs/loader.js:527:27) at Module.require (internal/modules/cjs/loader.js:683:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (C:\Users\Akuma\Desktop\alurapic\api-windows\config\express.js:1:17) at Module.compile (internal/modules/cjs/loader.js:776:30) at Object.Module.extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:643:32) at Function.Module.load (internal/modules/cjs/loader.js:556:12) at Module.require (internal/modules/cjs/loader.js:683:19) { code: 'MODULENOT_FOUND', requireStack: [ 'C:\Users\Akuma\Desktop\alurapic\api-windows\config\express.js', 'C:\Users\Akuma\Desktop\alurapic\api-windows\server.js' ] } 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 WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Akuma\AppData\Roaming\npm-cache_logs\2019-07-30T02_02_39_654Z-debug.log PS C:\Users\Akuma\Desktop\alurapic\api-windows> npm install npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/body-parser failed, reason: getaddrinfo ENOTFOUND proxy.company.com npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Akuma\AppData\Roaming\npm-cache_logs\2019-07-30T02_03_35_432Z-debug.log

3 respostas

Fala aí Mateus, tudo bem? Você realizou o npm install antes? Parece que as dependências não foram baixadas.

Tente fazer a instalação delas:

npm i
npm start

Espero ter ajudado

solução!

sim realizei e n tinha dado certo mas eu achei o erro desinstalando e instalando o node

Muito estranho, precisar dar uma olhada com mais calma para entender o houve.

Mas, fico feliz que tenha conseguido resolver seu problema.

Sempre que precisar não deixe de criar suas duvidas.

Abraços e bons estudos.