-
-
Notifications
You must be signed in to change notification settings - Fork 318
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug.
When running the CLI with --watch, the process crashes immediately after initial generation with:
TypeError: thisArg.isLocalTemplate is not a function
The error occurs inside runWatchMode() in:
cli/src/utils/generate/watcher.ts
The function incorrectly calls:
thisArg.isLocalTemplate(...)
However, isLocalTemplate is a standalone exported function, not a method on the CLI command instance (thisArg). This results in an undefined function call and crashes watch mode.
Expected behavior
When running CLI with --watch:
- Initial generation should complete successfully.
- Watcher should start monitoring changes.
- No runtime errors should occur.
- The process should remain alive and continue watching for changes.
Screenshots
How to Reproduce
- Run watch mode:
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --watch --output ./out
-
Observe initial successful generation.
-
After watcher starts, the CLI crashes with:
TypeError: thisArg.isLocalTemplate is not a function
🖥️ Device Information [optional]
- Operating System (OS): Windows(WSL)
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To Triage