-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recover from error #40
Comments
Watch mode on my machine doesn’t terminate when an error occurs. Can you share your node version and if possible the steps to reproduce? |
My node version is It happens only in some cases, for example here is one case where having a mismatch in your JSX tags would terminate it.
|
I think this problem may have been fixed in the latest alpha version 🤔 I’m currently preparing a |
I just gave this a shot and I seem to be getting the same build failure.
Here is what my
|
Another type of error that made it fail, hopefully this is helpful. info Changed src/use-data.ts
> src/use-data.ts:38:40: error: Expected ";" but found ":"
38 │ const groupedByCategory: {key: string}: string} = {};
╵ ^
file:///Users/tekestek/projects/health-icons-figma-plugin/node_modules/@create-figma-plugin/build/lib/utilities/build-bundles-async/build-bundles-async.js:89
throw new Error(formatEsbuildErrorMessage(error.message));
^
Error: esbuild error
Build failed with 1 error:
src/use-data.ts:38:40: error: Expected ";" but found ":"
at buildUiBundleAsync (file:///Users/tekestek/projects/health-icons-figma-plugin/node_modules/@create-figma-plugin/build/lib/utilities/build-bundles-async/build-bundles-async.js:89:15)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async Promise.all (index 1)
at async buildBundlesAsync (file:///Users/tekestek/projects/health-icons-figma-plugin/node_modules/@create-figma-plugin/build/lib/utilities/build-bundles-async/build-bundles-async.js:9:5)
at async Promise.all (index 0)
at async FSWatcher.<anonymous> (file:///Users/tekestek/projects/health-icons-figma-plugin/node_modules/@create-figma-plugin/build/lib/watch-async/watch-async.js:41:9) |
@iamtekeste Thanks for the logs! I think I managed to figure out what could be happening and shipped a fix to the Can you try and see if the latest version on the |
Great job @yuanqing you fixed it! Now it doesn't terminate it but rather shows the error and as soon as I fix the error it goes back to successful watch mode. Feel free to close this issue now. |
If you want a stretch goal for this what you can do is show the error on the plugin UI itself just like Next.js does. 😉 |
Cool |
The fix for this is now available as part of |
Hi @yuanqing I just wanted to let you know that I am enjoying using this toolkit. The only feedback I have is it should be able to recover from errors while in watch mode instead of terminating. It gets really cumbersome to have to restart it again and again after each error makes the build fail.
The text was updated successfully, but these errors were encountered: