I'm deploying my nestjs API to an intended-to-be-production environment, but I'm facing a few issues and would like to know how to fix em and how to have an elegant CD pipeline.
I'm facing these errors during deploy, not sure if they're independent or if one causes the other:
-
npm WARN config production Use
--omit=devinstead.
node:internal/modules/cjs/loader:1143
throw err;
^
Error: Cannot find module '/app/dist/main'
at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
at Module._load (node:internal/modules/cjs/loader:981:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.20.2