[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live) [Feedback](/c/feedback/8) # NextJS + Turborepo installs after building 126 views · 2 likes · 5 posts Typesafegh (@typesafegh) · 2025-03-14  I am jhaving this issue where Vercel reruns my install after it already finished the build when using NextJS 15.2.2 + Turborepo. Never had this happened before Note: I do not have a custom vercel.json but I do have a custom build command & custom install command and the custom install command is not being respected by the "Installing dependecies..." in the picture netohog (@netohog) · 2025-03-14 Hey! It looks like you’re experiencing some issues with your custom build/installation process since it’s not working as expected. To better troubleshoot this problem, I’d recommend running each step of the process separately. This approach should help you pinpoint exactly where things are breaking down. Anthony Shew (@anthony-shew) · 2025-03-14 · ♥ 1 We were able to take a look at the deployment based on those logs and it looks like you have a directory called `api/` in the application that is invoking [the Node.js builder](https://vercel.com/docs/functions/runtimes/node-js). However, the application is a Next.js app using the Next.js Framework preset - so the Next.js builder is also being invoked! We suggest you move the `api/` directory into the Next.js application following [Next.js Route Handler conventions](https://nextjs.org/docs/app/building-your-application/routing/route-handlers#convention). This will make it so the Node.js builder stops running, resolving this issue. Typesafegh (@typesafegh) · 2025-03-14 Thanks for looking into it! I am already using the NextJS way to write apis ( use route.ts under the app folder and export a GET/POST method to handle the request). The route files do import functions from a package in the monorepo but I don't see how this could be an issue. Still don't understand what do you mean by ` you have a directory called api/ in the application that is invoking the Node.js builder` as the routes are in the NextJS app folder Let me know if you need more information about the project structure I am open to send it to you privately or via email Typesafegh (@typesafegh) · 2025-03-17 · ♥ 1 Ok so after carefully looking again, I had accidentally created an `api` folder outside the nextjs appfolder So my nextjs project was in the "project" folder in my turborepo project the api folder was: ``` |-project |- api |- app ``` Instead of being like this: ``` |- project |- app |- api ``` So in short, make sure that you are api folder is inside the app folder. I am still curious to how does NextJS/ Vercel interpret that endpoint, will look into it eventually haha