I am trying to deploy my nextjs app on vercel. I have uploaded the repository and the necessary env variables. However whenever I attempt to deploy I have the error below:
Error fetching data: B [Error]: Dynamic server usage: no-store fetch procura-app-v1-1-1hkl.vercel.app/api/suppliers /dashboard/home/overview
at /vercel/path0/.next/server/chunks/8948.js:2:8558
at /vercel/path0/.next/server/chunks/8948.js:2:15891
at a.with (/vercel/path0/.next/server/chunks/8948.js:1:8885)
at c.with (/vercel/path0/.next/server/chunks/8948.js:1:3085)
at c.startActiveSpan (/vercel/path0/.next/server/chunks/8948.js:1:18140)
at a.startActiveSpan (/vercel/path0/.next/server/chunks/8948.js:1:18674)
at /vercel/path0/.next/server/chunks/8948.js:2:15424
at a.with (/vercel/path0/.next/server/chunks/8948.js:1:8885)
at c.with (/vercel/path0/.next/server/chunks/8948.js:1:3085)
I don’t really know why this is happening but I have a feeling it may be because of the environment variables.
It looks like the deployment was deleted. Still, the error you are getting is “Error: Entity with the specified id does not exist in the system” might be coming from the CosmosDB.
I am checking the details internally and will get back to you soon. Let us know if the next build was successful and no more debugging is required.
So after doing some research, I realized that error was because I had cache: "no-store" in my getData function. I have commented that out but that makes me wonder why that is a problem during the build? It seems to work fine during development.