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

Erro no npm start

Fiquei alguns dias sem estudar, quando voltei, depois de baixar o projeto da última aula, dá o erro a seguir, procurei ajuda no google mas não achei o erro. Desinstalei e instalei novamente no node.js mas continua o erro.

O que pode ser?

C:\alurapic>npm start

alurapic@1.0.0 start C:\alurapic node server.js

module.js:341 throw err; ^

Error: Cannot find module 'body-parser' at Function.Module._resolveFilename (module.js:339:15) at Function.Module._load (module.js:290:25) at Module.require (module.js:367:17) at require (internal/module.js:16:19) at Object. (C:\alurapic\config\express.js:3:19) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17)

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "start" npm ERR! node v5.10.0 npm ERR! npm v3.8.3 npm ERR! code ELIFECYCLE 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 'node server.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the alurapic package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs alurapic npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls alurapic npm ERR! There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to in stall?

npm ERR! Please include the following file with any support request: npm ERR! C:\alurapic\npm-debug.log

C:\alurapic>

2 respostas

Bom, acabo de dar um npm install e voltou...

solução!

É isso mesmo! Você precisa dar npm install para baixar as dependências do servidor que você está usando. :)