fix(cli): fix import resolution strategy for builders#15041
Merged
Conversation
Previously, if a builder was not found in the local cache directory, we were always installing it. This was incorrect. We should first check the CLI's node modules for the builder. This will support environments like the Vercel build container that pre-install all the builders for performance. This also fixes the e2e test for eleventy-v0. This fixture was incidentally failing to deploy with this bug, because a local .vercel/builders directory was created with node_modules. The test setup uses vc deploy, which does not push up the .gitignore file, so eleventy was then trying to read all of .vercel/builders and building it. This failed because there HAPPENED to be a file in there that Eleventy could not process. Through a series of fortunate circumstances, we found this bug.
🦋 Changeset detectedLatest commit: cd7917c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-lqu0tme2j.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-lqu0tme2j.vercel.sh/tarballs/vercel.tgz"
}
}
} |
Contributor
🧪 Unit Test StrategyComparing: Strategy: Code changed outside of a package - running all unit tests Affected packages - 25 (63%)
Unaffected packages - 15 (38%)
Results
This comment is automatically generated based on the affected testing strategy |
This reverts commit 4794a44.
tonypan2
approved these changes
Feb 13, 2026
ijjk
reviewed
Feb 13, 2026
ijjk
approved these changes
Feb 13, 2026
Merged
mehulkar
pushed a commit
that referenced
this pull request
Feb 13, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## vercel@50.17.0 ### Minor Changes - Install builder packages on demand ([#15023](#15023)) - Display functions exceeding 250MB uncompressed size limit with total size and breakdown of largest dependencies (requires environment variable VERCEL_ANALYZE_BUILD_OUTPUT=1). ([#14067](#14067)) ### Patch Changes - Add `--format=json` option to `vercel integration list` and show project name in table header when results are scoped to a project ([#15007](#15007)) - Fix builder import resolution from pre-installed depenencies ([#15041](#15041)) - Services routing improvements: ([#15018](#15018)) - Fix route ownership scoping so parent service catch-alls (e.g. Vite SPA fallback) don't capture sibling service prefixes - Move shared ownership-guard helpers (`getOwnershipGuard`, `scopeRouteSourceToOwnership`) to `@vercel/routing-utils` - Place runtime service function outputs under internal `/_svc/<service>/index` namespace to prevent filesystem path leakage - Block `/_svc` as a reserved routePrefix in service validation - Scope all builder-emitted routes (not just route-owning builders) to their service ownership before merging - Updated dependencies \[]: - @vercel/static-build@2.8.37 - @vercel/build-utils@13.4.0 - @vercel/next@4.15.28 - @vercel/redwood@2.4.9 - @vercel/rust@1.0.5 ## @vercel/client@17.2.41 ### Patch Changes - Updated dependencies \[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]: - @vercel/routing-utils@5.3.3 - @vercel/build-utils@13.4.0 ## @vercel/fs-detectors@5.8.6 ### Patch Changes - Services routing improvements: ([#15018](#15018)) - Fix route ownership scoping so parent service catch-alls (e.g. Vite SPA fallback) don't capture sibling service prefixes - Move shared ownership-guard helpers (`getOwnershipGuard`, `scopeRouteSourceToOwnership`) to `@vercel/routing-utils` - Place runtime service function outputs under internal `/_svc/<service>/index` namespace to prevent filesystem path leakage - Block `/_svc` as a reserved routePrefix in service validation - Scope all builder-emitted routes (not just route-owning builders) to their service ownership before merging - Updated dependencies \[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]: - @vercel/routing-utils@5.3.3 - @vercel/frameworks@3.17.1 ## @vercel/routing-utils@5.3.3 ### Patch Changes - Services routing improvements: ([#15018](#15018)) - Fix route ownership scoping so parent service catch-alls (e.g. Vite SPA fallback) don't capture sibling service prefixes - Move shared ownership-guard helpers (`getOwnershipGuard`, `scopeRouteSourceToOwnership`) to `@vercel/routing-utils` - Place runtime service function outputs under internal `/_svc/<service>/index` namespace to prevent filesystem path leakage - Block `/_svc` as a reserved routePrefix in service validation - Scope all builder-emitted routes (not just route-owning builders) to their service ownership before merging <!-- VADE_RISK_START --> > [!NOTE] > Low Risk Change > > This PR is an automated Changesets release that only updates version numbers in package.json files and adds changelog entries - no source code changes are present. > > - Deletes changeset markdown files after consuming them > - Bumps version numbers in 4 package.json files > - Adds changelog entries documenting previous changes > > <sup>Risk assessment for [commit 9186d29](https://github.com/vercel/vercel/commit/9186d293adee9d555b8582f5c1d0cec87689acf1).</sup> <!-- VADE_RISK_END --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mehulkar
added a commit
that referenced
this pull request
Feb 16, 2026
2 commits related moving builders out of the bundle: - #15023 - #15041 Since it's isn't a clean revert, I've: - moved builders back into dependencies, and reverted import-builders and its tests to the commit at 3cd0b55 (parent of 127547d). No other commits have landed to these files since then, so it seems like the best way of doing this. This commit also contains a timestamp update on all builders `.deploy` files. This is just a way to invalidate the builders so all e2e tests run on this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, if a builder was not found in the local cache directory, we
were always installing it. This was incorrect. We should first check the
CLI's node modules for the builder. This will support environments like
the Vercel build container that pre-install all the builders for
performance.
This also fixes the e2e test for eleventy-v0. This fixture was
incidentally failing to deploy with this bug, because a local
.vercel/builders directory was created with node_modules. The test setup
uses vc deploy, which does not push up the .gitignore file, so eleventy
was then trying to read all of .vercel/builders and building it. This
failed because there HAPPENED to be a file in there that Eleventy could
not process. Through a series of fortunate circumstances, we found this
bug.
Note
Low Risk Change
This PR changes builder import resolution order to check CLI's node_modules before installing, which is a logic change in build tooling but does not affect security, auth, or data integrity.
Risk assessment for commit cd7917c.