Enable source maps in Node command for better stack trace debugging

This commit is contained in:
SennayT
2026-07-21 08:30:52 +00:00
parent d4b8e9a564
commit 4914288c03

View File

@@ -57,4 +57,7 @@ RUN addgroup --system --gid 1001 nodejs \
COPY --from=deployer --chown=nestjs:nodejs /deploy . COPY --from=deployer --chown=nestjs:nodejs /deploy .
USER nestjs USER nestjs
EXPOSE 4000 EXPOSE 4000
CMD ["node", "dist/main.js"] # --enable-source-maps: translate stack-trace frames from dist/*.js back to
# src/*.ts using the .js.map files nest build emits (tsconfig sourceMap:true).
# Without it Node reports compiled JS line numbers, not TypeScript source.
CMD ["node", "--enable-source-maps", "dist/main.js"]