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

[BUG]: snapshot.json data is malformed #2897

Open
fran122157 opened this issue Sep 2, 2024 · 3 comments
Open

[BUG]: snapshot.json data is malformed #2897

fran122157 opened this issue Sep 2, 2024 · 3 comments
Labels
bug Something isn't working drizzle/kit priority Will be worked on next

Comments

@fran122157
Copy link

fran122157 commented Sep 2, 2024

What version of drizzle-orm are you using?

0.33.0

What version of drizzle-kit are you using?

0.24.2

Describe the Bug

When executing npx drizzle-kit generate I get the following error:

src/db/drizzle/meta/0014_snapshot.json data is malformed
src/db/drizzle/meta/0015_snapshot.json data is malformed
src/db/drizzle/meta/0016_snapshot.json data is malformed
src/db/drizzle/meta/0017_snapshot.json data is malformed
src/db/drizzle/meta/0018_snapshot.json data is malformed
src/db/drizzle/meta/0019_snapshot.json data is malformed
src/db/drizzle/meta/0020_snapshot.json data is malformed
src/db/drizzle/meta/0021_snapshot.json data is malformed
src/db/drizzle/meta/0022_snapshot.json data is malformed
src/db/drizzle/meta/0023_snapshot.json data is malformed
src/db/drizzle/meta/0024_snapshot.json data is malformed
src/db/drizzle/meta/0025_snapshot.json data is malformed
src/db/drizzle/meta/0026_snapshot.json data is malformed
src/db/drizzle/meta/0027_snapshot.json data is malformed
src/db/drizzle/meta/0028_snapshot.json data is malformed
src/db/drizzle/meta/0029_snapshot.json data is malformed
src/db/drizzle/meta/0030_snapshot.json data is malformed
src/db/drizzle/meta/0031_snapshot.json data is malformed
src/db/drizzle/meta/0032_snapshot.json data is malformed
src/db/drizzle/meta/0033_snapshot.json data is malformed
src/db/drizzle/meta/0034_snapshot.json data is malformed
src/db/drizzle/meta/0035_snapshot.json data is malformed
src/db/drizzle/meta/0036_snapshot.json data is malformed
src/db/drizzle/meta/0037_snapshot.json data is malformed
src/db/drizzle/meta/0038_snapshot.json data is malformed
src/db/drizzle/meta/0039_snapshot.json data is malformed

Here's my drizzle.config.js

export default {
  dialect: "mysql",
  schema: "./src/db/schema.ts",
  out: "./src/db/drizzle",
  dbCredentials: {
    ...
  },
};

Expected behavior

No response

Environment & setup

No response

@fran122157 fran122157 added the bug Something isn't working label Sep 2, 2024
@fran122157
Copy link
Author

Any advice on this one??

generate is working fine with:

"drizzle-orm": "^0.29.3",
"drizzle-kit": "^0.20.18",

@emilio-v
Copy link

I get the same error in these versions:

"drizzle-orm": "^0.35.0",
"drizzle-kit": "^0.26.0",

any solution?

@L-Mario564 L-Mario564 added drizzle/kit priority Will be worked on next labels Oct 24, 2024
@oscar-corredor
Copy link

Just had the same issue as you guys, I updated to "drizzle-kit": "^0.26.2" and "drizzle-orm": "^0.35.3" and that solved the issue, hope it fixes it for you as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working drizzle/kit priority Will be worked on next
Projects
None yet
Development

No branches or pull requests

4 participants