-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[now-node] fix reportTSError exiting #3244
Conversation
@igorklopov PRs should be submitted to the canary branch (not master) |
Before this PR:
After this PR:
I'm not sure this is a better solution because the stack trace is not relevant to the user 🤔 |
Right. But in all cases (except this one with |
c28e3b8
to
26f5a36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the branch to canary and ran lint.
It looks like more was changed but its just line 197 that's relevant 👍
Thanks!
This fixes abnormal process exit when there is an error like `console.log(Math.round("42"));` and `compilerOptions.noEmitOnError` is `true` in `tsconfig.json`. See https://github.com/zeit/now/blob/2dee810e74ff656cb36184656949268d2e4e038b/packages/now-node/src/typescript.ts#L307 and https://github.com/zeit/now/blob/2dee810e74ff656cb36184656949268d2e4e038b/packages/now-node/src/typescript.ts#L197
This fixes abnormal process exit when there is an error like
console.log(Math.round("42"));
andcompilerOptions.noEmitOnError
istrue
intsconfig.json
. See https://github.com/zeit/now/blob/2dee810e74ff656cb36184656949268d2e4e038b/packages/now-node/src/typescript.ts#L307 and https://github.com/zeit/now/blob/2dee810e74ff656cb36184656949268d2e4e038b/packages/now-node/src/typescript.ts#L197