Closed wxs77577 closed 5 years ago
We do plan to get rid of both soon https://github.com/nestjs/typescript-starter/pull/151
But the problem is still exists: It's different between built *.js
files and raw *.ts
files.
Sometimes, it's all fine during my local development, but when I push codes to server and reload the pm2 process (which just run npm start
), it crashed, just because of a typing define problem, but there is no problem when I use npm run start:dev
(because it compile ts files to plain js files), so, would you think that is a problem ?
@wxs77577 I don't think this have anything to do with Nest at all. ts-node will mitigate all TS typechecking errors, so you can't really rely on that when deploying to a production server. You should be looking into a proper CI/CD pipeline using unit testing, linting, e2e testing and deployment.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Feature Request
Is your feature request related to a problem? Please describe.
npm run start:dev
to build all .ts files to .js files, it's different from server deployed script:npm start
(it runs *.ts directly)npm run start:dev
is slow.Describe the solution you'd like
Add a script in
package.json
like 'serve`Teachability, Documentation, Adoption, Migration Strategy
use
npm run serve
insteadnpm run start:dev
(or not)What is the motivation / use case for changing the behavior?
ts-node-dev
is becoming more and more popular.