-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Bug]: Give more context for [CLI]: Failed to read tuono.config.ts
#578
Comments
I think you forgot to run # download zip of feat/gracefull-shutdown branch
cargo build
pnpm install
pnpm run build
cd examples/tuono-app
# or any other example
../../target/debug/tuono.exe dev A more detailed error message could have made it easier to identify the issue quickly. |
Yep, I'd forgotten to build 🤦
Definitely! I think from my understanding this error has two causes:
So we should create mitigations and provide error messages for both cases:
WDYT? |
Personally I don't like the idea to have the CLI printing a troubleshooting guide. Version mismatchWe should trow an error on this scenario, Forgetting to buildThere are already few check in place around rust source code . E.g.: Lines 179 to 181 in d6fc18e
Probably we need to refine the error better when building the config.
I don't think so, The error occurred on rust side?The current error is actually fine. The error occurred due to a JS runtime error?This already happened in the past: The error should be something like:
@Valerioageno already had setup this via Are you suggesting to add a new flag to the tuono CLI instead of setting |
Completely agree. Only thing to be careful of is when working on projects in this monorepo, you are technically using a newer version in the project than in the CLI. This is usually not an issue, but because of #565, I think there are a few issues now. I haven't opened an issue because in next release, this will be solved because #565 code will be in the CLI also.
The existing checks are good, and have saved me a few times, we might just need to add some more.
Yeah you're right, I think we do need an additional error there.
Something like a We also silence stuff in our tuono/packages/tuono/src/build/index.ts Line 44 in d6fc18e
I think maybe we should make one of the big issues like we did for our doc writing to track progress on errors. WDYT @marcalexiei @Valerioageno? Maybe just use this one since we are having a big discussion, the scope of which may be wider than this issue IMHO. |
Note To avoid discussing many things in this issue I would consider focus solely on the following point: Forgetting to build
What additional error you would like to add? Note To avoid to lose track of the other points I linked / create a project task for each of them.
|
I would like it to give me more information. Lines 217 to 222 in d6fc18e
Just refactor to use a match and do something like: eprintln!("[CLI] Failed to read tuono.config.ts: {}", err); I think from there, it should be easier for the developer to deduce what the problem is. |
I would consider to print the error on a new line to better distinct it from the |
Sounds good! Shall I start work in a PR? |
Yes, thank you |
Description
When I get this error I have no idea what to do.
Some things that can (but don't always) cause this:
tuono dev
, but out of scope of this issue)Expected behaviour
tuono dev
to run as normal.How to reproduce
Difficult to do. Here's where I get the issue now:
This is not caused by the PR on that branch I don't think.
Screenshots
No response
System Info
System info (Rust)
Additional context
No response
The text was updated successfully, but these errors were encountered: