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

Docs(deploying-with-docker.mdx): Inform user about turbo prune command #7948

Merged
merged 3 commits into from Apr 22, 2024

Conversation

WillKirkmanM
Copy link
Contributor

@WillKirkmanM WillKirkmanM commented Apr 12, 2024

Description

The command turbo prune web --docker produces an error if the name in the package.json is not set to web, for example:

{
   name: "next-app",
   private: true,
   ...
}

It will then throw the error: package web not found. This change informs the user that it is being assumed that the name given in the package.json is "web".

image

Testing Instructions

  1. Create a nextjs project with a name other than web, next-app for example.
  2. Copy the Dockerfile for the nextjs app found here in the deploying with docker handbook
  3. Run the command docker-compose up
  4. Expect an Error stating package web not found
  5. Change the line RUN turbo prune web --docker to RUN turbo prune next-app --docker
  6. Run the command docker-compose up
  7. It should run successfully

The command `turbo prune web --docker` produces an error if the name in the package.json is not set to web

```
{
   name: "nextjs-app"
}
```

It will then throw the error: `package web not found`. This change informs the user that it is being assumed that the name given in the package.json is "web".
@WillKirkmanM WillKirkmanM requested review from anthonyshew and a team as code owners April 12, 2024 11:23
@turbo-orchestrator turbo-orchestrator bot added area: docs Improvements or additions to documentation owned-by: turborepo labels Apr 12, 2024
Copy link

vercel bot commented Apr 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 6:21pm

Copy link

vercel bot commented Apr 12, 2024

@WillKirkmanM is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

chris-olszewski pushed a commit that referenced this pull request Apr 15, 2024
)

### Description

Related to #7948, in running the
`turbo prune` when specifying a package name, it is assumed that the
package name is the name of the **folder** in `apps/web` or
`packages/eslint-config`. The real case is that the package name is the
name found in the `package.json` file in the `apps/*` directory.



![](https://private-user-images.githubusercontent.com/98240335/321965428-6f02ca1f-3697-46ab-ac8e-18f7397b6a50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMxNzI3NTEsIm5iZiI6MTcxMzE3MjQ1MSwicGF0aCI6Ii85ODI0MDMzNS8zMjE5NjU0MjgtNmYwMmNhMWYtMzY5Ny00NmFiLWFjOGUtMThmNzM5N2I2YTUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE1VDA5MTQxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiNDNjMTVhNTYwODQ5YjEwMzlkYjhiMTI5MTBiY2FhMmNmMWJmNGVkZjAyZTZhOTdmNjQyODgwZGY0NWM4Y2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LnyiaG_okxX13DaQhxCMCY8PMQOh1TbCGL0TqVbXVDo)

This pull requests adds more detail and clarity towards the uncertainty
of defining what the package means.

**Files Edited**
Line 46 of
https://github.com/vercel/turbo/blob/main/crates/turborepo-lib/src/commands/prune.rs
```rs
    #[error("invalid scope: package {0} not found")]
    MissingWorkspace(PackageName),
```
to
```rs
    #[error("invalid scope: package with name {0} in package.json not found")]
    MissingWorkspace(PackageName),
```
@WillKirkmanM WillKirkmanM changed the title Inform user about turbo prune command Docs(deploying-with-docker.mdx): Inform user about turbo prune command Apr 16, 2024
@ijjk
Copy link
Member

ijjk commented Apr 16, 2024

Allow CI Workflow Run

  • approve CI run for commit: 95638dd

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful! Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants