You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My nextJS Apis have accessed some config files through the file system,
for example, the /posts folder under the project root.
importfsfrom"fs";importpathfrom"path";constpostsDirectory=path.join(process.cwd(),"posts");constfilenames=fs.readdirSync(postsDirectory);// failed in deployment
However, the folder structure has been optimized(? and is not as same as local development and local build.
So basically the /posts folder isn't there in the deployed environment.
Problem
My nextJS Apis have accessed some config files through the file system,
for example, the
/posts
folder under the project root.However, the folder structure has been optimized(? and is not as same as local development and local build.
So basically the
/posts
folder isn't there in the deployed environment.Solution
vercel/next.js#8251 (comment)
The text was updated successfully, but these errors were encountered: