Skip to content

Bug: Infinite loop in rc-apps watch #174

@amitb0ra

Description

@amitb0ra

Description

The rc-apps watch command enters an infinite build loop on Windows/WSL2 environments. This happens because the file watcher triggers on build artifacts (in dist/) or dependency changes (node_modules/), creating a cycle:
Change -> Build -> Update dist/ -> Change Detected -> Build ...

This occurs even when dist/** is added to .rcappsconfig, suggesting chokidar ignore patterns are not behaving as expected in this environment or the default ignores are insufficient.

Steps to Reproduce

  1. Setup:
    • Create a new app and setup .rcappsconfig
    • Ensure dist/ folder does not exist or is empty.
  2. Execution:
    • Run rc-apps watch .
  3. Observation:
    • The CLI packages and deploys the app successfully.
    • Immediately after, it detects a change (likely the new dist/ artifact) and deploys again.
    • This loop continues indefinitely.
    • Logs shows:
Image
  1. Failure of Mitigation:
    • Adding **/node_modules/** , dist/** and **/dist/** to .rcappsconfig ignoredFiles does not stop the loop in this environment.

Environment Details

  • OS: Windows (WSL2 / Ubuntu)
  • Node Version: v22.16.0
  • Rocket.Chat Server: v7.13.2
  • CLI Version: 1.13.0 wsl-x64 node-v20.19.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions