-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turborepo doesn't work with pnpm v9 #8168
Comments
This was done in #7993 and will go out with next release. (If you want to use it sooner, support is on the canary releases today.) |
@anthonyshew I still can reproduce this issue with the latest ❯ git clone https://github.com/issueset/turborepo-pnpm9-graph
❯ cd turborepo-pnpm9-graph
❯ git checkout pnpm9-1.13.4-canary.5
❯ pnpm install
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
devDependencies:
+ @acme/eslint-config 0.0.0 <- packages/eslint-config
+ @changesets/cli 2.27.2
+ eslint 8.57.0
+ prettier 3.2.5
+ turbo 1.13.4-canary.5
Done in 2.3s
❯ pnpm why turbo
Legend: production dependency, optional only, dev only
/private/tmp/turborepo-pnpm9-graph
devDependencies:
turbo 1.13.4-canary.5
❯ pnpm turbo build --graph
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] @acme/core#build" -> "[root] @acme/eslint-config#build"
"[root] @acme/core#build" -> "[root] @acme/tsconfig#build"
"[root] @acme/docs#build" -> "[root] @acme/core#build"
"[root] @acme/docs#build" -> "[root] @acme/eslint-config#build"
"[root] @acme/docs#build" -> "[root] @acme/tsconfig#build"
"[root] @acme/docs#build" -> "[root] @acme/utils#build"
"[root] @acme/eslint-config#build" -> "[root] ___ROOT___"
"[root] @acme/tsconfig#build" -> "[root] ___ROOT___"
"[root] @acme/utils#build" -> "[root] @acme/eslint-config#build"
"[root] @acme/utils#build" -> "[root] @acme/tsconfig#build"
}
}
❯ pnpm install
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 584ms
❯ pnpm turbo build --graph
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] @acme/core#build" -> "[root] ___ROOT___"
"[root] @acme/docs#build" -> "[root] ___ROOT___"
"[root] @acme/eslint-config#build" -> "[root] ___ROOT___"
"[root] @acme/tsconfig#build" -> "[root] ___ROOT___"
"[root] @acme/utils#build" -> "[root] ___ROOT___"
}
} |
Will re-open so we don't forget to take another look. |
had the same issue, upgrading to turbo@1.13.3 solved it for me as mentioned in #7993 |
Can you make sure you rebuild your lockfile after the pnpm upgrade? I just tried your reproduction repo with 1.13.4 and got the correct graph:
|
I can still reproduce this issue with the latest turbo@2.0.4. Here are the reproduce steps: /tmp ❯ git clone https://github.com/issueset/turborepo-pnpm9-graph -b pnpm9-2.0.4 test-dir-1
Cloning into 'test-dir-1'...
remote: Enumerating objects: 123, done.
remote: Counting objects: 100% (123/123), done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 123 (delta 52), reused 116 (delta 45), pack-reused 0
Receiving objects: 100% (123/123), 176.74 KiB | 512.00 KiB/s, done.
Resolving deltas: 100% (52/52), done.
/tmp ❯ cd test-dir-1
/tmp/test-dir-1 pnpm9-2.0.4 ❯ pnpm --version
9.4.0
/tmp/test-dir-1 pnpm9-2.0.4 ❯ pnpm install
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +600
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 600, reused 599, downloaded 0, added 600, done
devDependencies:
+ @acme/eslint-config 0.0.0 <- packages/eslint-config
+ @changesets/cli 2.27.5
+ eslint 8.57.0
+ prettier 3.3.2
+ turbo 2.0.4
Done in 2.6s
/tmp/test-dir-1 pnpm9-2.0.4 ❯ pnpm why turbo
Legend: production dependency, optional only, dev only
turborepo-pnpm9-graph /private/tmp/test-dir-1
devDependencies:
turbo 2.0.4
/tmp/test-dir-1 pnpm9-2.0.4 ❯ pnpm turbo build --graph --log-order grouped
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] @acme/core#build" -> "[root] ___ROOT___"
"[root] @acme/docs#build" -> "[root] ___ROOT___"
"[root] @acme/eslint-config#build" -> "[root] ___ROOT___"
"[root] @acme/tsconfig#build" -> "[root] ___ROOT___"
"[root] @acme/utils#build" -> "[root] ___ROOT___"
}
}
/tmp/test-dir-1 pnpm9-2.0.4 ❯ I tried clean /tmp ❯ git clone https://github.com/issueset/turborepo-pnpm9-graph -b pnpm9-2.0.4 test-dir-2
Cloning into 'test-dir-2'...
remote: Enumerating objects: 123, done.
remote: Counting objects: 100% (123/123), done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 123 (delta 52), reused 116 (delta 45), pack-reused 0
Receiving objects: 100% (123/123), 176.74 KiB | 514.00 KiB/s, done.
Resolving deltas: 100% (52/52), done.
/tmp ❯ cd test-dir-2
/tmp/test-dir-2 pnpm9-2.0.4 ❯ pnpm --version
9.4.0
/tmp/test-dir-2 pnpm9-2.0.4 ❯ rm -rf pnpm-lock.yaml
/tmp/test-dir-2 pnpm9-2.0.4 !1 ❯ pnpm install
Scope: all 6 workspace projects
WARN 5 deprecated subdependencies found: @humanwhocodes/config-array@0.11.14, @humanwhocodes/object-schema@2.0.3, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +600
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 649, reused 599, downloaded 0, added 600, done
devDependencies:
+ @acme/eslint-config 0.0.0 <- packages/eslint-config
+ @changesets/cli 2.27.5
+ eslint 8.57.0 (9.5.0 is available)
+ prettier 3.3.2
+ turbo 2.0.4
Done in 11.2s
/tmp/test-dir-2 pnpm9-2.0.4 11s ❯ pnpm turbo build --graph --log-order grouped
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] @acme/core#build" -> "[root] ___ROOT___"
"[root] @acme/docs#build" -> "[root] ___ROOT___"
"[root] @acme/eslint-config#build" -> "[root] ___ROOT___"
"[root] @acme/tsconfig#build" -> "[root] ___ROOT___"
"[root] @acme/utils#build" -> "[root] ___ROOT___"
}
}
/tmp/test-dir-2 pnpm9-2.0.4 ❯ |
Local dependencies weren't detected, so something as simple as `turbo build` would explode. See vercel/turborepo#8168.
Did you ever get this resolved? Going back to |
I believe this has been fixed in |
Still having issues with this, sticking to version pnpm version 8 until this is fixed. |
@jpmadrigal07 Can you open a new Issue with a reproduction? Thank you! |
Verify canary release
Link to code that reproduces this issue
https://github.com/issueset/turborepo-pnpm9-graph
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo 1.13.4-canary.4
Describe the Bug
After I update
pnpm
from v8.15.8 to v9.1.1,turbo
cannot create the dependency graph correctly, which causes the incorrect task executing order.I first thought this is caused by the default configuration updates in pnpm v9.0. However, I updated
.npmrc
and reset all changed configuration to the same value as pnpm v8, turbo still doesn't work.Expected Behavior
In my reproduction repo below, running
pnpm turbo build --graph
should print the same graph for pnpm v8 and v9.To Reproduce
Additional context
No response
The text was updated successfully, but these errors were encountered: