Home
Support Forums

Cannot deploy next.js app from a subdirectory

My nextJS docs website is in a subdirectory /docs. I have set this directory as my base directory in the UI however the nextJS plugin fails the build as seen in the logs Netlify App. I made a new repo with a copy of the app and building from the root directory works. Does anyone know what config I might be missing to properly build the app from this subdirectory?
Thanks

This is resolved: I assumed Netlify was calling yarn build by default but I had to add it in the UI. The workflow was failing because there simply was no app built. It seems when I set it up in a different repo, the build command field was pre-filled so not sure what happened here.

1 Like