I ran the command npm start
and got the following error.
node:internal/modules/cjs/loader:928
throw err;
^
Error: Cannot find module 'express'
Require stack:
- C:CodecodeFilecode-file-appdistserverserver.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:CodecodeFilecode-file-appdistserverserver.js:6:35)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
code: 'MODULE_NOT_FOUND',
}
npm ERR! code 1
npm ERR! path C:CodecodeFilecode-file-appserver
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c node ../dist/server/server.js
npm ERR! A complete log of this run can be found in:
npm ERR! C:Userspatriv5AppDataLocalnpm-cache_logs2023-04-20T15_45_54_540Z-debug.log
I already ran the command npm install express
and see express listed in my package.json dependencies and in my node_modules folder yet I am still receiving the error. Has anybody else encountered this issue?