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
- Setup:
- Create a new app and setup .rcappsconfig
- Ensure
dist/ folder does not exist or is empty.
- Execution:
- 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:
- 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
Description
The
rc-apps watchcommand enters an infinite build loop on Windows/WSL2 environments. This happens because the file watcher triggers on build artifacts (indist/) or dependency changes (node_modules/), creating a cycle:Change -> Build -> Update dist/ -> Change Detected -> Build ...This occurs even when
dist/**is added to.rcappsconfig, suggestingchokidarignore patterns are not behaving as expected in this environment or the default ignores are insufficient.Steps to Reproduce
dist/folder does not exist or is empty.rc-apps watch.dist/artifact) and deploys again.**/node_modules/**,dist/**and**/dist/**to.rcappsconfigignoredFilesdoes not stop the loop in this environment.Environment Details