Skip to content
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

Error when generating offline mode file #2218

Closed
Sycration opened this issue Nov 20, 2022 · 3 comments
Closed

Error when generating offline mode file #2218

Sycration opened this issue Nov 20, 2022 · 3 comments

Comments

@Sycration
Copy link

So my mysql instance is up and working:
image

and I have the sqlx cli installed:

> cargo sqlx --version
cargo-sqlx 0.6.2

and the same url is in the .env file,
but when I try to generate the sqlx-data.json, all I get is this:

> cargo sqlx prepare
error: EOF while parsing a value at line 1 column 0 

How do I properly generate the offline files? I feel that spinning up a database during the build step would be a ridiculous thing to do.

@laundmo
Copy link
Contributor

laundmo commented Nov 22, 2022

For me, this was caused by an issue when running cargo metadata - could you check whether that completes successfully for you?

@Sycration
Copy link
Author

It produces 2MB worth of JSON.
metadata.txt

@Sycration
Copy link
Author

Ok, I solved it by updating a different crate in the workspace. No idea how this caused this issue, but the error message is totally unclear.

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

No branches or pull requests

2 participants