Next.js Discord

Discord Forum

Turbo related question. Issues with .next-folder in turborepo monorepo

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
Hey everyone.
There is one single issue i can not resolve since several weeks.
I have a turborepo with a nextjs application inside of it. When this app gets build, next will create the build folder ".next" with all stuff in it.
Imagine this app is called "my-next-app" with a dependency within the monoreop to "packages/dependency-of-next-app.

When i cd to the root of the repo after building the next-app and try to execute a command like "pnpm dev:another-app", i'll get an error from turbo saying:
turbo run dev:another-app failed: Failed to add workspace "dependency-of-next-app" from "packages/dependency-of-next-app/package.json", it already exists at "apps/mynext-app/.next/standalone/packages/dependency-of-next-app/package.json"

Why? I'm force to remove .next-folder to work further with turbo? Is there any trick to tell turbo that it should ignore those package.json's or build folders like '.next'?

Thanks


Update:
I've already found the ignore cli argument here https://turbo.build/repo/docs/reference/command-line-reference/run#--ignore but isn't there a way to set those ignore args in the turbo config?

0 Replies