Fix turbo gen bundler resolution by externalizing npm package dependencies#587
Draft
Fix turbo gen bundler resolution by externalizing npm package dependencies#587
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Created helper scripts (validate-package-name.cjs, parse-repo-url.cjs) to avoid turbo gen's bundling issues - Replaced static imports of hosted-git-info and validate-npm-package-name with execSync calls to helper scripts - Upgraded turbo and @turbo/gen to latest version (2.8.8) - Helper scripts use CommonJS (.cjs extension) to avoid ES module conflicts This fixes the "Cannot find package" error that prevented the generators from working. Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Added oxlint-disable comments for __dirname usage (needed for turbo gen) - Added oxlint-disable comments for console.log in helper scripts (intentional output) - Removed unused catch parameter - Reduced lint errors from 15 to 9 (remaining are pre-existing Plop type issues) Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pnpm generate command for copy plugin
Fix turbo gen bundler resolution by externalizing npm package dependencies
Feb 17, 2026
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.
Turbo gen's internal bundler fails to resolve
hosted-git-infoandvalidate-npm-package-nameimports inconfig.ts, causingpnpm generate "copy plugin"to fail withResolveMessage: Cannot find packageerrors.Changes
Created external helper scripts that bypass turbo's bundling:
turbo/generators/scripts/validate-package-name.cjs- npm package name validationturbo/generators/scripts/parse-repo-url.cjs- git repository URL parsingModified
config.tsto call helpers viaexecSync()instead of direct imports:Upgraded turbo from 2.8.2 to 2.8.8
Helper scripts use
.cjsextension to avoid ES module conflicts with root package.json"type": "module".Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
sanity-cdn.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/plugins/plugins/dev/test-studio/node_modules/.bin/../sanity/bin/sanity build(dns block)turbo.build/usr/bin/curl curl -s REDACTED git dule�� HEAD(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.