2 months ago
The logs are talking about a TypeScript problem, but we don't have one on our end. We can run npm install , npm run build and our start command all without issues.
0 Replies
Why it works locally but not in deploy
Local: your Node/TS toolchain is picking up the right tsconfig values (with "experimentalDecorators": true, "emitDecoratorMetadata": true, "useDefineForClassFields": false).
Deploy (Nixpacks): the builder is likely defaulting to standard decorators (TS 5.6+) because useDefineForClassFields isn’t being respected, or experimentalDecorators isn’t making it into the right tsconfig that Nest sees when it runs nest build.
That’s why it explodes only in CI/CD.
I figured out the problem. Took about two days to figure this out.
Solution:
For our API, we're using NestJS. We have a TurboRepo package called typescript-config which has our NestJS-specific config items in there. While this works locally, the Nest "engine" doesn't play nicely with our TurboRepo "shared packages" format.
We copied our config over directly into our API's tsconfig.json file, and the build works fine now.
Status changed to Solved noahd • 2 months ago