cloudflare / cloudflare/workerd
🐛 Bug Report — Runtime APIs: bad error message related to durable objects SQLite API`
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
See [this miniflare issue](https://github.com/cloudflare/workers-sdk/issues/11352) for more details.
I got this issue running my tests that used miniflare:
```
Error: SQL is not enabled for this Durable Object class. To enable it, change `new_classes` to `
new_sqlite_classes` within the 'migrations' field in your wrangler.jsonc or wrangler.toml file. If using workerd directly,set `enableSql = true` in your workerd config for the class. Note that this change cannot be made after the class is already deployed to production.
```
(coming from [this workerd code](https://github.com/cloudflare/workerd/blob/276ef197dc9d1310f7a063c54a82541247bec309/src/workerd/api/actor-state.c%2B%2B#L815))
I was **not** using wokerd directly, I **was** using `new_sqlite_classes`, and it was **not** for a class that had already been deployed.
Ultimately i had to pass `useSQLite: true` (note this is **not** `enableSql=true`) into miniflare (the isssue linked above describes the solution more).
Improving this error message will hopefully save futures users a lot of headaches!
Thank you,
Blake
Contributor guide
Assessment
This issue has not been assessed yet.