Skip to content

Docs improvements: clearing build cache, concurrently running next + trigger, trouble shooting pino #1758

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

Merged
merged 9 commits into from
Mar 5, 2025

Conversation

samejr
Copy link
Member

@samejr samejr commented Mar 5, 2025

A range of docs improvements:

  • Adds “Explore by build extension” to the intro page
  • Adds instructions for clearing the build cache\
  • Add a tip for running trigger dev + next dev concurrently
  • left align table headers
  • Adds trouble shooting for pino
  • Adds corepack bug and workaround
  • Removes reference to undici as it messes with spans
  • Adds example for exporting logs to Axiom

Summary by CodeRabbit

  • Documentation
    • Introduced a new section with configuration examples for telemetry exporters.
    • Added guidance on handling Corepack errors and troubleshooting deployment issues, including cache clearing and external package settings.
    • Enhanced the Next.js guide with instructions for running development servers concurrently.
    • Expanded the introduction with a table of build extensions.
    • Improved table formatting in logging and machine configurations for better readability.

Copy link

changeset-bot bot commented Mar 5, 2025

⚠️ No Changeset found

Latest commit: f12fa08

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request updates multiple documentation files. It adds new sections—such as "Exporters," "Explore by build extension," and details on a corepack error—to guide users on telemetry exporter configuration, build extensions, and error resolution. New component imports (e.g., <CorepackError /> and <RunDevAndNextConcurrently />) are introduced in deployment, Next.js guide, and troubleshooting files. Additionally, a snippet is provided describing how to run Next.js and Trigger.dev concurrently, and minor table formatting adjustments have been applied across several docs.

Changes

File(s) Change Summary
docs/config/config-file.mdx, docs/introduction.mdx, docs/snippets/corepack-error.mdx Added new documentation sections: "Exporters" with an OTLP trace exporter example; "Explore by build extension" listing build extensions; and "Cannot find matching keyid" for corepack error guidance.
docs/deployment/overview.mdx, docs/guides/frameworks/nextjs.mdx, docs/troubleshooting.mdx Introduced new component imports and usage: <CorepackError /> for error context, and <RunDevAndNextConcurrently /> for instructions on simultaneous server runs; troubleshooting docs also now include sections on cache clearing and resolving module errors.
docs/snippets/run-dev-and-next-concurrently.mdx Added a new snippet detailing modifications to package.json, enabling concurrent execution of Next.js and Trigger.dev servers with color-coded log outputs.
docs/logging.mdx, docs/machines.mdx Updated Markdown table header formatting using colons for alignment and adjusted descriptions for consistency.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant T as Terminal
    participant C as Concurrently
    participant N as Next.js App
    participant TD as Trigger.dev Server

    U->>T: Run "npm run dev"
    T->>C: Execute concurrently scripts from package.json
    C->>N: Start Next.js application
    C->>TD: Start Trigger.dev server
    N-->>C: Emit colored log output
    TD-->>C: Emit colored log output
    C-->>T: Display combined logs
Loading

Possibly related PRs

Suggested reviewers

  • ericallam
  • nicktrn

Poem

I'm a rabbit with a skip and a hop,
New docs and codes, I just can't stop.
Exporters and errors, all neat and bright,
Concurrent servers dancing in the night.
With tables aligned and guides so clear,
I nibble on carrots, celebrating here!
🥕🐇


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/snippets/run-dev-and-next-concurrently.mdx (1)

1-20: Review of "RunDevAndNextConcurrently" Documentation Snippet
The snippet clearly outlines how to configure the package.json scripts to run both the Next.js app and Trigger.dev concurrently. One minor suggestion: consider rephrasing the sentence on line 19 to avoid potential duplication. For example, you could replace "Trigger.dev dev server" with "Trigger.dev development server" for clarity.

Proposed diff:

- "This will run both your Next.js app and Trigger.dev dev server in the same terminal window, with color-coded output to distinguish between them."
+ "This will run both your Next.js app and Trigger.dev development server in the same terminal window, with color-coded output to distinguish between them."
🧰 Tools
🪛 LanguageTool

[duplication] ~19-~19: Possible typo: you repeated a word.
Context: ...l run both your Next.js app and Trigger.dev dev server in the same terminal window, wit...

(ENGLISH_WORD_REPEAT_RULE)

docs/troubleshooting.mdx (2)

33-36: Enhanced "Clear the build cache" Section
This new section clearly explains how to clear the build cache by stopping the local dev server and deleting the hidden .trigger folder. For improved readability, consider adding a comma after "local dev server" in the sentence on line 35.

-Ensure you have stopped your local dev server then locate the hidden `.trigger` folder in your project and delete it.
+Ensure you have stopped your local dev server, then locate the hidden `.trigger` folder in your project and delete it.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~35-~35: A comma might be missing here.
Context: ... Ensure you have stopped your local dev server then locate the hidden .trigger folde...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


71-74: Improvement for pino Error Guidance
The added guidance for the error Cannot find module '/app/lib/worker.js" when using pino is helpful. To strengthen the instruction, consider using a more assertive verb—such as "include" instead of "add"—to improve clarity on updating the external build settings.

-If you see this error, add pino (and any other associated packages) to your `external` build settings in your `trigger.config.ts` file. Learn more about the `external` setting in the [config docs](/config/config-file#external).
+If you see this error, include pino (and any other associated packages) in your `external` build settings in your `trigger.config.ts` file. Learn more about the `external` setting in the [config docs](/config/config-file#external).
🧰 Tools
🪛 LanguageTool

[style] ~73-~73: Consider an alternative verb to strengthen your wording.
Context: ...lib/worker.js"` when using pino If you see this error, add pino (and any other ass...

(IF_YOU_HAVE_THIS_PROBLEM)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b10d0b and f12fa08.

📒 Files selected for processing (9)
  • docs/config/config-file.mdx (1 hunks)
  • docs/deployment/overview.mdx (2 hunks)
  • docs/guides/frameworks/nextjs.mdx (2 hunks)
  • docs/introduction.mdx (1 hunks)
  • docs/logging.mdx (1 hunks)
  • docs/machines.mdx (1 hunks)
  • docs/snippets/corepack-error.mdx (1 hunks)
  • docs/snippets/run-dev-and-next-concurrently.mdx (1 hunks)
  • docs/troubleshooting.mdx (3 hunks)
✅ Files skipped from review due to trivial changes (3)
  • docs/snippets/corepack-error.mdx
  • docs/machines.mdx
  • docs/logging.mdx
🧰 Additional context used
🪛 LanguageTool
docs/snippets/run-dev-and-next-concurrently.mdx

[duplication] ~19-~19: Possible typo: you repeated a word.
Context: ...l run both your Next.js app and Trigger.dev dev server in the same terminal window, wit...

(ENGLISH_WORD_REPEAT_RULE)

docs/troubleshooting.mdx

[uncategorized] ~35-~35: A comma might be missing here.
Context: ... Ensure you have stopped your local dev server then locate the hidden .trigger folde...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[style] ~73-~73: Consider an alternative verb to strengthen your wording.
Context: ...lib/worker.js"` when using pino If you see this error, add pino (and any other ass...

(IF_YOU_HAVE_THIS_PROBLEM)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
docs/deployment/overview.mdx (2)

7-8: Import and Usage of CorepackError Component
The addition of the import statement for CorepackError from /snippets/corepack-error.mdx is clear and consistent with similar changes in other documentation files. Please ensure that the corresponding snippet is up to date so that the error guidance is consistent across all pages.


235-236: Rendering the CorepackError Component
The insertion of <CorepackError /> at the end of the document effectively embeds error-handling guidance for Corepack issues. Verify that its placement logically follows related troubleshooting content and that the snippet renders correctly in all output formats of the documentation.

docs/introduction.mdx (1)

88-103: New "Explore by build extension" Section
This new section is well structured and provides a helpful table listing various build extensions along with descriptions and documentation links. The left-aligned headers improve readability. Please double-check that each link points to the correct and updated documentation page.

docs/guides/frameworks/nextjs.mdx (2)

22-23: Import of RunDevAndNextConcurrently Component
The import statement for RunDevAndNextConcurrently from /snippets/run-dev-and-next-concurrently.mdx is correctly added and follows the established documentation pattern.


37-38: Insertion of RunDevAndNextConcurrently Component
Integrating the <RunDevAndNextConcurrently /> component into the guide enhances the practical instructions for running the development servers concurrently. Ensure that future updates to the snippet are mirrored in this guide to maintain consistency.

docs/config/config-file.mdx (1)

140-171: New "Exporters" Section in Configuration
The added "Exporters" section through a detailed code snippet provides excellent guidance on configuring an OTLP trace exporter (using the Axiom endpoint) for telemetry. The snippet is well formatted and explains how to initialize the exporter with appropriate headers. Ensure that the environment variable names (AXIOM_API_TOKEN and AXIOM_DATASET) are consistent with the rest of the documentation.

docs/troubleshooting.mdx (2)

9-9: New Import for CorepackError
The addition of the CorepackError import enhances error handling in the documentation by providing a dedicated component for Corepack-related issues. Verify that the snippet path (/snippets/corepack-error.mdx) is correct and that the referenced component is available.


75-75: Effective Integration of CorepackError Component
The use of <CorepackError /> integrates consistent error handling for Corepack issues, aligning with similar implementations in the deployment documentation.

@samejr samejr changed the title Docs/improvements Docs improvements: clearing build cache, concurrently running next + trigger, trouble shooting pino Mar 5, 2025
@ericallam ericallam merged commit 31c2a23 into main Mar 5, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants