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

Watch mode crashes and exits on any errors. #82

Open
threehams opened this issue May 22, 2021 · 0 comments
Open

Watch mode crashes and exits on any errors. #82

threehams opened this issue May 22, 2021 · 0 comments

Comments

@threehams
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant