Bug: Infinite loop in rc-apps watch

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #175 by @someone — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
node.js, typescript
Domain
cli, tooling

Research direction

Start at the rc-apps watch entry point and inspect how .rcappsconfig and its ignoredFiles patterns are passed to the file watcher. Reproduce on Windows/WSL2 with an empty dist/ directory, then verify that generated dist/ artifacts and node_modules/ changes no longer trigger repeated builds or deployments.

Written by the indexing model from the issue text.

Description

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
Dominant language
TypeScript
Stars
49
Forks
40
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.Apps-cli

All issues in RocketChat/Rocket.Chat.Apps-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.