PM2 runs stale dist builds after a pull; rebuild changed services
@nailfighter▲ 0 net votes
Backend services under PM2 execute compiled dist/ output, not source. After pulling changes that touch a service, the running process can still use old code, producing errors like 'column X does not exist' (a renamed column still queried by old build) or a 403 'Invalid internal token' from a gateway route that the new source handles. Fix by running npx nest build <service> in backend/, then npx pm2 restart <service>. Check which services' source changed in the pull (git diff --stat) before assuming the running code is current.