Skip to content

feat: added monorepo build error handling#810

Merged
DenhamPreen merged 1 commit intomainfrom
kv/monorepo
Mar 11, 2026
Merged

feat: added monorepo build error handling#810
DenhamPreen merged 1 commit intomainfrom
kv/monorepo

Conversation

@keenbeen32
Copy link
Collaborator

@keenbeen32 keenbeen32 commented Mar 11, 2026

Added some info on have an indexer in a monorepo

Summary by CodeRabbit

  • Documentation

    • Added troubleshooting guide for configuring Envio within a monorepo environment
  • Network Support

    • Removed Injective from supported networks
    • Added Fantom to supported networks

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
envio-docs Ready Ready Preview, Comment Mar 11, 2026 7:54am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

Documentation updates removing Injective network from supported networks lists across HyperRPC and HyperSync, adding Fantom support to HyperSync, updating the supported-networks.json configuration, and adding troubleshooting guidance for using Envio in monorepo environments with pnpm workspaces.

Changes

Cohort / File(s) Summary
Monorepo Setup Documentation
docs/HyperIndex/Troubleshoot/common-issues.md
Added new subsection "Using Envio inside a monorepo" explaining missing-generated-code errors in monorepo setups and solution for pnpm-workspace.yaml configuration.
Network Support Updates
docs/HyperRPC/hyperrpc-supported-networks.md, docs/HyperSync/hypersync-supported-networks.md, supported-networks.json
Removed Injective network entry from supported networks documentation and configuration; added Fantom network support to HyperSync documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Jordy-Baby

Poem

🐰 wiggles whiskers
Networks shuffle, change their way,
Fantom hops into the fray,
Injective bids its last goodbye,
Monorepo tips help indexers fly! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions 'monorepo build error handling' but the actual changes include monorepo documentation, removal of Injective from network support tables, and addition of Fantom network support. Update the title to accurately reflect all main changes, such as 'docs: Add monorepo setup guide and update supported networks' to cover the monorepo documentation addition and network list updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kv/monorepo

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/HyperIndex/Troubleshoot/common-issues.md`:
- Line 46: The manual Table of Contents is missing a nested entry for the new
subsection "Using Envio inside a monorepo"; update the in-page TOC (the
markdown/HTML TOC block that lists "PNPM version compatibility" and "Runtime
Issues") to insert a nested entry labeled "Using Envio inside a monorepo" under
the appropriate parent (likely between "PNPM version compatibility" and "Runtime
Issues") so the TOC links to the "Using Envio inside a monorepo" heading.
- Around line 50-60: The documented fix for pnpm-workspace.yaml is wrong because
pnpm only treats matched directories as workspace packages if they also contain
a package.json; update the instructions in the pnpm-workspace.yaml section to
state that adding "envio-indexer/generated" to the packages list alone won't
work unless envio-indexer/generated contains a package.json, and instead
recommend one of three correct approaches: use a negated glob to exclude the
generated dir (e.g., add "!envio-indexer/generated" to the packages list), move
the generated output outside workspace globs, or make envio-indexer/generated a
real workspace package by adding its own package.json; reference
pnpm-workspace.yaml, the packages list, and envio-indexer/generated so readers
can locate the lines to change.

In `@docs/HyperSync/hypersync-supported-networks.md`:
- Line 58: Add a Fantom Testnet row to the Supported Networks table to mirror
the canonical manifest entry (supported-networks.json → fantom-testnet); create
a row labeled "Fantom Testnet" with chain ID 4002 and the same URL pattern as
the Fantom mainnet row (e.g., https://fantom-testnet.hypersync.xyz or
https://4002.hypersync.xyz for the explorer-style column and
https://fantom-testnet.rpc.hypersync.xyz or https://4002.rpc.hypersync.xyz for
the RPC column), and use an appropriate testnet indicator emoji so the table
matches the manifest entry for fantom-testnet.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9a90868-1989-49fa-9ea4-ecdbbf8b171f

📥 Commits

Reviewing files that changed from the base of the PR and between 3f72a7e and 08db13a.

📒 Files selected for processing (4)
  • docs/HyperIndex/Troubleshoot/common-issues.md
  • docs/HyperRPC/hyperrpc-supported-networks.md
  • docs/HyperSync/hypersync-supported-networks.md
  • supported-networks.json
💤 Files with no reviewable changes (2)
  • supported-networks.json
  • docs/HyperRPC/hyperrpc-supported-networks.md


> **Important:** Always run `pnpm codegen` immediately after cloning an indexer repository using Envio.

### Using Envio inside a monorepo
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update the manual TOC for this new section.

This subsection is new, but the Table of Contents still jumps from PNPM version compatibility to Runtime Issues. Please add a nested entry for “Using Envio inside a monorepo” so the in-page navigation stays accurate.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperIndex/Troubleshoot/common-issues.md` at line 46, The manual Table
of Contents is missing a nested entry for the new subsection "Using Envio inside
a monorepo"; update the in-page TOC (the markdown/HTML TOC block that lists
"PNPM version compatibility" and "Runtime Issues") to insert a nested entry
labeled "Using Envio inside a monorepo" under the appropriate parent (likely
between "PNPM version compatibility" and "Runtime Issues") so the TOC links to
the "Using Envio inside a monorepo" heading.

Comment on lines +50 to +60
**Cause:** `pnpm-workspace.yaml` doesn't include both your indexer root and its generated output directory.

**Solution:** Add both `<envio-indexer>` and `<envio-indexer>/generated` to the `packages` list in `pnpm-workspace.yaml`, for example:

```yaml
packages:
- "apps/*"
- "packages/*"
- "envio-indexer"
- "envio-indexer/generated"
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Does pnpm only treat directories matched by pnpm-workspace.yaml packagesglobs as workspace packages when they contain apackage.json? How should generated directories without a package.json be handled in pnpm workspaces?

💡 Result:

Yes—pnpm only treats directories that both (a) match pnpm-workspace.yaml packages globs and (b) contain a package.json as workspace packages. Directories that match the glob but don’t have a package.json are not valid workspace packages and should be avoided because they commonly cause confusion (some tooling even flags it as an error condition). [1]

How to handle generated directories without a package.json:

  • Exclude them from the workspace globs using negated patterns in pnpm-workspace.yaml (recommended), e.g. !**/dist/**, !**/.generated/**. pnpm explicitly supports include/exclude globbing in packages. [2]
  • Or move generated output outside the directories matched by your packages globs. [1]

If the generated directory is intended to be a workspace package (i.e., you want pnpm to link it / run recursive commands in it), then it needs its own package.json. [1]

Sources:
[1] Vercel conformance rule explaining that workspace-glob-matched directories must contain package.json and recommending exclude/move/convert-to-package fixes. (vercel.com)
[2] pnpm docs showing pnpm-workspace.yaml packages supports include/exclude (negated) globs. (dimava.github.io)

Citations:


The documented pnpm-workspace.yaml solution is incorrect and will not resolve the issue.

pnpm only recognizes directories as workspace packages if they both match packages globs AND contain a package.json. Adding envio-indexer/generated to the packages list without a package.json in that directory will have no effect.

For generated directories, use one of these approaches instead:

  • Exclude the generated directory from workspace globs using negated patterns:
    packages:
      - "apps/*"
      - "packages/*"
      - "envio-indexer"
      - "!envio-indexer/generated"
  • Move generated output outside the workspace directories.
  • If generated/ should be a workspace package, ensure it contains its own package.json.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperIndex/Troubleshoot/common-issues.md` around lines 50 - 60, The
documented fix for pnpm-workspace.yaml is wrong because pnpm only treats matched
directories as workspace packages if they also contain a package.json; update
the instructions in the pnpm-workspace.yaml section to state that adding
"envio-indexer/generated" to the packages list alone won't work unless
envio-indexer/generated contains a package.json, and instead recommend one of
three correct approaches: use a negated glob to exclude the generated dir (e.g.,
add "!envio-indexer/generated" to the packages list), move the generated output
outside workspace globs, or make envio-indexer/generated a real workspace
package by adding its own package.json; reference pnpm-workspace.yaml, the
packages list, and envio-indexer/generated so readers can locate the lines to
change.

| Cyber | 7560 | https://cyber.hypersync.xyz or https://7560.hypersync.xyz | https://cyber.rpc.hypersync.xyz or https://7560.rpc.hypersync.xyz | 🪨 |
| Eth Traces | 1 | https://eth-traces.hypersync.xyz or https://1-traces.hypersync.xyz | https://eth-traces.rpc.hypersync.xyz or https://1-traces.rpc.hypersync.xyz | 🏅 |
| Ethereum Mainnet | 1 | https://eth.hypersync.xyz or https://1.hypersync.xyz | https://eth.rpc.hypersync.xyz or https://1.rpc.hypersync.xyz | 🏅 |
| Fantom | 250 | https://fantom.hypersync.xyz or https://250.hypersync.xyz | https://fantom.rpc.hypersync.xyz or https://250.rpc.hypersync.xyz | 🪨 |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add the matching Fantom Testnet row.

Line 58 adds Fantom mainnet, but the canonical supported-networks.json already includes supported-networks/fantom-testnet too. Leaving it out here makes this “Supported Networks” page incomplete relative to the source-of-truth manifest.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperSync/hypersync-supported-networks.md` at line 58, Add a Fantom
Testnet row to the Supported Networks table to mirror the canonical manifest
entry (supported-networks.json → fantom-testnet); create a row labeled "Fantom
Testnet" with chain ID 4002 and the same URL pattern as the Fantom mainnet row
(e.g., https://fantom-testnet.hypersync.xyz or https://4002.hypersync.xyz for
the explorer-style column and https://fantom-testnet.rpc.hypersync.xyz or
https://4002.rpc.hypersync.xyz for the RPC column), and use an appropriate
testnet indicator emoji so the table matches the manifest entry for
fantom-testnet.

@DenhamPreen
Copy link
Contributor

Please avoid pushing the network changes, it runs in the build and clutters prs

Network Support

  • Removed Injective from supported networks
  • Added Fantom to supported networks

@DenhamPreen DenhamPreen merged commit d63cd1a into main Mar 11, 2026
3 checks passed
@DenhamPreen DenhamPreen deleted the kv/monorepo branch March 11, 2026 14:54
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