Skip to content
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] Regression - Using turbo prune was working without turbo.json, fails since 1.7.1 #3645

Closed
maximveksler opened this issue Feb 6, 2023 · 5 comments · Fixed by #3785 · May be fixed by X-oss-byte/turbo#195 or X-oss-byte/turbo#210
Labels
kind: bug Something isn't working

Comments

@maximveksler
Copy link

What version of Turborepo are you using?

1.7.1

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Describe the Bug

I'm using turbo prune as part of my docker ci/cd flow, other than for prune a different build system is handling the test/lint/build flow, since turbo has support for pnpm workspace projects discovery no turbo.json was required.

Working 1.7.0

Example for behavior in 1.7.0

(base) m@m-inspiron5567:~/code/allbetter/Core$ pnpm install turbo@1.7.0 --global    
Packages: +2 -2
++--
Progress: resolved 40, reused 31, downloaded 0, added 0, done

/home/m/.local/share/pnpm/global/5:
- turbo 1.7.1
+ turbo 1.7.0 (1.7.3 is available)

Done in 1.7s
(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo prune --scope="better" --docker
╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│                   Update available v1.7.0 ≫ v1.7.3                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v1.7.3    │
│                    Run "npm i -g turbo" to update                    │
│                                                                      │
│     Follow @turborepo for updates: https://twitter.com/turborepo     │
╰──────────────────────────────────────────────────────────────────────╯
Generating pruned monorepo for better in /home/m/code/allbetter/Core/out
 - Added better
 - Added better-config
 - Added middlewares
 - Added utils

Failing 1.7.1

(base) m@m-inspiron5567:~/code/allbetter/Core$ pnpm install turbo@1.7.1 --global    
Packages: +2 -2
++--
Progress: resolved 40, reused 31, downloaded 0, added 0, done
.pnpm/turbo@1.7.1/node_modules/turbo: Running postinstall script, done in 79ms

/home/m/.local/share/pnpm/global/5:
- turbo 1.7.0
+ turbo 1.7.1 (1.7.3 is available)

Done in 2.2s
(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo prune --scope="better" --docker
╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│                   Update available v1.7.1 ≫ v1.7.3                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v1.7.3    │
│                    Run "npm i -g turbo" to update                    │
│                                                                      │
│     Follow @turborepo for updates: https://twitter.com/turborepo     │
╰──────────────────────────────────────────────────────────────────────╯
Generating pruned monorepo for better in /home/m/code/allbetter/Core/out
 - Added better
 - Added better-config
 - Added generator-app
 - Added middlewares
 - Added utils
 ERROR  failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist
Turbo error: failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist

Expected Behavior

turbo prune should seccssfuly prepare the out directory.

To Reproduce

  1. Setup a pnpm workspace,
  2. Install turbo repo 1.7.1+ globally.
  3. Attempt to run turbo prune

Reproduction Repo

No response

@maximveksler maximveksler added area: turborepo kind: bug Something isn't working labels Feb 6, 2023
@maximveksler
Copy link
Author

Workaround:

echo '{}' > turbo.json

@chris-olszewski
Copy link
Member

Hi @maximveksler, this should be fixed in 1.7.3. Please reopen #3570 if the issue persists after updating your turbo version.

@chris-olszewski chris-olszewski closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2023
@maximveksler
Copy link
Author

@chris-olszewski, please note the regression occures on 1.7.3 as well

(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo --version
1.7.3
(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo prune --scope="better" --docker
Generating pruned monorepo for better in /home/m/code/allbetter/Core/out
 - Added better
 - Added better-config
 - Added generator-app
 - Added middlewares
 - Added utils
(base) m@m-inspiron5567:~/code/allbetter/Core$ rm turbo.json 
(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo prune --scope="better" --docker
Generating pruned monorepo for better in /home/m/code/allbetter/Core/out
 - Added better
 - Added better-config
 - Added generator-app
 - Added middlewares
 - Added utils
 ERROR  failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist
Turbo error: failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist

@maximveksler
Copy link
Author

(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo --version
1.7.4
(base) m@m-inspiron5567:~/code/allbetter/Core$ turbo prune --scope="better" --docker
Generating pruned monorepo for better in /home/m/code/allbetter/Core/out
 - Added better
 - Added better-config
 - Added generator-app
 - Added middlewares
 - Added utils
 ERROR  failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist
Turbo error: failed to read turbo.json: Could not find turbo.json. Follow directions at https://turbo.build/repo/docs to create one: file does not exist

@maximveksler
Copy link
Author

@chris-olszewski this seems to be a seperate issues from #3570, perhaps reopen this issue instead of keep #3570 opened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
2 participants