Skip to content

Circular dependencies in newly migrated repository #8135

Answered by anthonyshew
zmelendez-cbs asked this question in Help
Discussion options

You must be logged in to vote

Circular dependencies happen when you have dependencies installed into each other such that an order for the package graph can't be determined.

For instance, given two packages with these package.jsons:

// ./packages/a/package.json
 {
   "name": "@repo/a",
   "scripts": {
     "build": "tsc"
   },
   "dependencies": {
     "@repo/b": "workspace:*"
    }
 }
// ./packages/b/package.json
 {
   "name": "@repo/b",
    "scripts": {
     "build": "tsc"
   },
   "dependencies": {
     "@repo/a": "workspace:*"
    }
 }

In this case, there's no way for turbo to understand which "build" to run first. If @repo/a needs @repo/b to be available for it to build, @repo/b needs to be built first...But how …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zmelendez-cbs
Comment options

@anthonyshew
Comment options

Answer selected by anthonyshew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants