Next.js Discord

Discord Forum

how to find the current path on Vercel?

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
I'm trying to parse a directory in my app and on my dev machine finding the directory is as simple as path.resolve(path.join(process.cwd + "pages")); but when deploying to Vercel it appears the directory structure is slightly different during the build phase. How can I find my application's project directory on Vercel?

(note - frustratingly, I've tried just debugging using build logs, but our build logging is larger than the 2000 line limit and the data I output is lost)

1 Reply