Next.js Discord

Discord Forum

Module Not Found Error

Answered
Keyhole wasp posted this in #help-forum
Open in Discord
Keyhole waspOP
I have a static file stored which is storagecredentials.json, which I use for GCP. All functionality is working on my local machine,
But when I deploy to vercel - it shows me module not found error:
An error occurred: Error: ENOENT: no such file or directory, open '/var/task/apps/web-app/public/storagecredentials.json'
Answered by Keyhole wasp
I changed the path.join(process.cwd()) and now it picks up
View full answer

5 Replies

Keyhole waspOP
no, i dont't think so
It works for other files
Answer
Keyhole waspOP
maybe vercel has different architecture