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 to have a specific "direction".

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 nee…

Replies: 2 comments 6 replies

Comment options

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

@anthonyshew
Comment options

@AhmedBaset
Comment options

@austinm911
Comment options

Answer selected by anthonyshew
Comment options

You must be logged in to vote
2 replies
@anthonyshew
Comment options

@mrmckeb
Comment options

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