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

Nx watch goes into indefinite loop #22914

Open
1 of 4 tasks
ThePlenkov opened this issue Apr 19, 2024 · 4 comments
Open
1 of 4 tasks

Nx watch goes into indefinite loop #22914

ThePlenkov opened this issue Apr 19, 2024 · 4 comments
Assignees
Labels

Comments

@ThePlenkov
Copy link

Current Behavior

Hi! I think I just managed to reproduce a situation when nx watch goes into an indefinite loop constantly running same task again and again.
It runs build command which is supposed to be cached ( and it is ) but DaemonSocketMessenger keeps receiving the information that file is changed and runs same command again.

Expected Behavior

It's ok if watch command listens for all files ( ideally I would prefer that watch can also accept somehow only certain files to watch, not for everything ) but even though it should not run the command again if file was processed ( target inputs are not changed and target result is cached )

GitHub Repo

https://github.com/ThePlenkov/nx-plantuml

Steps to Reproduce

Preferably open repo in codespaces or make sure you have docker installed ( for command execution )

  1. npm run dev
  2. Make any change, like for example add a new line to readme

Nx Report

Node   : 20.12.1
OS     : linux-x64
npm    : 10.5.0

nx         : 18.3.1
@nrwl/tao  : 18.3.1

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@ThePlenkov
Copy link
Author

I tried to disable daemon - it stays same

@ThePlenkov
Copy link
Author

tried to use nx:run-commands executor instead of npm script - same result..

@jbadeau
Copy link

jbadeau commented May 3, 2024

Did you try to add

"nx": { "includedScripts": [] }

to package json

@ThePlenkov
Copy link
Author

On vacation now - will check when come. But from another side I don't want to ignore scripts, I think what happens - is that watch doesn't analyze inputs and outputs properly running task even if it's cached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants