Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

264
Visualizações
"MODULE_NOT_FOUND" after npm run server

I just picked up a new book, Fullstack React and when trying to run the example app, I am getting the error of module not found. The modules in question are apparently live-server. Here's the error message. I've done npm install before npm run server and no luck

> live-server public --host=localhost --port=3000 --middleware=./disable-browser-cache.js

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

Error: Cannot find module './disable-browser-cache.js'
Require stack:
- C:\Users\Suleyman\AppData\Roaming\npm\node_modules\live-server\index.js
- C:\Users\Suleyman\AppData\Roaming\npm\node_modules\live-server\live-server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at C:\Users\Suleyman\AppData\Roaming\npm\node_modules\live-server\index.js:189:10
    at Array.map (<anonymous>)
    at Object.LiveServer.start (C:\Users\Suleyman\AppData\Roaming\npm\node_modules\live-server\index.js:183:13)
    at Object.<anonymous> (C:\Users\Suleyman\AppData\Roaming\npm\node_modules\live-server\live-server.js:174:12)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Suleyman\\AppData\\Roaming\\npm\\node_modules\\live-server\\index.js',
    'C:\\Users\\Suleyman\\AppData\\Roaming\\npm\\node_modules\\live-server\\live-server.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! voting_app@1.1.0 server: `live-server public --host=localhost --port=3000 --middleware=./disable-browser-cache.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the voting_app@1.1.0 server 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!     C:\Users\Suleyman\AppData\Roaming\npm-cache\_logs\2022-03-29T07_43_25_808Z-debug.log
PS C:\Users\Suleyman\Downloads\fullstack-react-master\fullstack-react-master\voting_app> ```
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Delete both node_modules and package-lock.json and run the following npm commands and it should solve your problem.

npm cache clean --force
npm install

and then

npm start
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda