Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Watch mode crashes and exits on any errors. #82

Open
@threehams

Description

@threehams

I'm trying this out on a new project (which means I'm making lots of mistakes), and in watch mode, xstate-codegen appears to crash and exit on any error, instead of logging to the console and continuing to watch. This means I'm having to manually restart the process on almost every change.

For example, when I create a new file called error.machine.ts:

    at StateNode.formatTransitions (node_modules\xstate\lib\StateNode.js:1367:114)node_modules\xstate-codegen\bin\index.js:159
                        throw new Error("Could not read from path " + filePath);
                              ^

Error: Could not read from path apps\frontend\lib\error.machine.ts
    at node_modules\xstate-codegen\bin\index.js:159:31
    // etc
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm about to set up a watcher on top of it so I can make mistakes without having to restart the process manually every time I make a mistake.

Is this expected, or maybe something environment-related?

Environment:
xstate-codegen 0.3.0
Windows
PowerShell
Node 16.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions