Skip to content
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

[typescript] Crash when updating unmodified files or updating to an error state, silent in Node 16 #1491

Closed
dead-claudia opened this issue May 10, 2023 · 2 comments

Comments

@dead-claudia
Copy link

dead-claudia commented May 10, 2023

Expected Behavior

This is a family of highly related bugs, and the two links are for two different sets of test cases. Here's the expectation with each type of bug:

  • Invalid to invalid: process to remain alive and print resulting error
  • Valid to invalid: process to remain alive and print resulting error
  • Invalid to valid: dist.js to be created/updated

Actual Behavior

  • Invalid to invalid: process crashes, silently in Node 16 but with output in Node 20
  • Valid to invalid: process crashes, silently in Node 16 but with output in Node 20
  • Invalid to valid: dist.js is not generated, even if you touch it after the initial correction

The error generated by Node v20.1.0 is this:

node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received an instance of Error
    at process.set [as exitCode] (node:internal/bootstrap/node:124:9)
    at process.exit (node:internal/process/per_thread:188:24)
    at process.close (/home/claudia/rollup-typescript-silent-crash/node_modules/rollup/dist/shared/watch-cli.js:543:19) {
  code: 'ERR_INVALID_ARG_TYPE'
}

The README details each one of these in full.

Additional Information

Here's what I tried:

  • Installing with clean npm caches using --cache
  • Restarting the Debian VM in WSL, to check for kernel state issues
  • Creating a new throwaway Ubuntu VM in WSL, to fully isolate the kernel's state

The issue in question is a family of highly related errors. The reason they're split is because I did a few times have the type variant (but not the unused variant) report an actual TS error before exiting, but I wasn't able to easily isolate it while putting together this repro. I also suspect it's just a minor variation of the same issue.

Let me know if you need anything else.

@dead-claudia
Copy link
Author

Filed rollup/rollup#4986 to track it on Rollup's side, in case it's a Rollup proper issue (which I find most likely). Still filed it here as well since I couldn't fully isolate it from the TypeScript plugin.

@stale stale bot added the x⁷ ⋅ stale label Aug 10, 2023
@stale
Copy link

stale bot commented Aug 12, 2023

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant