Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

267
Vistas
"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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda