#why im getting a weird error when revalidating after submitting a form?
1 messages · Page 1 of 1 (latest)
Hi @ocean topaz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the information provided in the extracts, it seems like you're encountering an error when trying to use revalidateTag after submitting a form. This error message suggests that the static generation store is missing when revalidateTag is called.
One possible reason for this error could be related to how you're fetching data in your application. As mentioned in the Github Issue 50714 (https://github.com/vercel/next.js/issues/50714), revalidateTag is typically used with Fetch. If you're pulling data directly from your database via external functions and not using Fetch, revalidateTag might not work as expected.
Another user in the same issue thread suggested using unstable_cache to make it work, but this might not be the best solution as it's not a stable feature.
If you're trying to revalidate a specific path, you might want to consider using revalidatePath instead. This function is used to invalidate the cache of a specific path, which might be more suitable for your use case.
Please note that these are just possible solutions based on the information provided in the extracts. For a more accurate solution, you might want to provide a minimal reproduction of your code.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@ocean topaz kapa.ai is still learning and improving, please let us know how it did by reacting below