I want to load data from a JSON file in Next.js (app router).
https://vercel.com/guides/loading-static-file-nextjs-api-route#how-to-load-data-from-a-file-in-next.js I already checked and follow this guide, so it is working in dev environment (local).
The problem is I can't read that file in production (deployed on Vercel). I checked the log, it says there's no that JSON file. "Error: ENOENT: no such file or directory"
I tried to put the file inside 'app' or in root folder but not workin in any case.
The project file structure is (app router):
- src
- actions
- app
- pages ...
- components ...
Please help me.
