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

[turborepo] early exit when trying to use rollup's watch mode #4983

Closed
NullVoxPopuli opened this issue May 16, 2023 · 4 comments · Fixed by rollup/rollup#5027
Closed

[turborepo] early exit when trying to use rollup's watch mode #4983

NullVoxPopuli opened this issue May 16, 2023 · 4 comments · Fixed by rollup/rollup#5027
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@NullVoxPopuli
Copy link

What version of Turborepo are you using?

1.9.6

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Describe the Bug

rollup's watch mode is killed by turbo, or not waited for?, hard to tell.

Expected Behavior

turbo does not early exit, and rollup continues building / watching for changes.

To Reproduce

Also written here: NullVoxPopuli/limber#926

  1. git clone git@github.com:NullVoxPopuli/limber.git
  2. cd limber
  3. git checkout how-to-get-turbo-rollup-watching
  4. pnpm i --ignore-scripts
  5. observe that in packages/ember-repl/addon/package.json the start script is rollup --config --watch
  6. try to start watch mode via turbo: pnpm turbo start --filter ember-repl
  7. observe that turbo exited, when it should have not-exited due to rollup being in watch mode
  8. cd packages/ember-repl/addon
  9. pnpm start
  10. observe that the start script in this package is a long-running watch mode that doesn't exit unless Ctrl+C is pressed (or some other kill/stop process signal is sent to the process)

Reproduction Repo

NullVoxPopuli/limber#926

@NullVoxPopuli NullVoxPopuli added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels May 16, 2023
@nathanhammond
Copy link
Contributor

Hey @NullVoxPopuli! As a first pass I looked at the turbo.json and your command (filtered) and it seems not likely to be the case, but: is it possible that you have another task in the execution which is exiting non-zero? Unless you specify --continue turbo will bail at the exact moment any task exits non-zero.

Dropping this as a "just in case" bit of feedback, will take a more-detailed pass later.

@NullVoxPopuli
Copy link
Author

Hello! Thanks for looking in to this!

it possible that you have another task in the execution which is exiting non-zero?

I don't think so -- in the reproduction, there are no other tasks?

@mehulkar
Copy link
Contributor

I can reproduce this in a much simpler example too: https://github.com/mehulkar/turbo-issue-4983. Need to look into how the rollup executable works. I tried passing --no-stdin to rollup just in case I'd get lucky with that explanation, but that didn't work.

@mehulkar
Copy link
Contributor

Ok , this seems somewhat related to rollup/rollup#5004 and related issues pointed there. I tried rollup@3.20 in the example and it seems to work. I've updated the readme in the instructions to show how it working with the older version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants