-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[turborepo] Update codemod doesn't support custom registries and fails if NPM registry is unavailable #4152
Labels
Comments
Hi! Thanks for raising this. We may be able to get this information from your current package manager instead but obviously the command will need to be reworked to support that. Another alternative is providing a flag to override this value. I will update this issue with any developments. Thanks! |
Meligy
pushed a commit
to Meligy/turborepo
that referenced
this issue
Jan 25, 2025
Meligy
pushed a commit
to Meligy/turborepo
that referenced
this issue
Jan 25, 2025
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Turborepo are you using?
1.8.1
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Windows
Describe the Bug
I have an outdated version 1.8.1 of turborepo. When I run turbo commands, it shows me a message to run a codemod to update. However, when I run the codemod to update turborepo it fails. It shows "Unable to fetch the latest version of turbo" error message.
NPM registry is banned by our corporate firewall, and we use a proxy registry. In this scenario the codemod doesn't work.
The reason why it happens is because the registry url is hardcoded in the codemod: https://github.com/vercel/turbo/blob/main/packages/turbo-codemod/src/commands/migrate/steps/getLatestVersion.ts#LL5
Expected Behavior
It should use the same registry as the package manager and shouldn't rely on availability of NPM registry.
To Reproduce
To reproduce this issue, configure your package manager to use custom registry, ban npm registry on a network level and run
pnpm dlx @turbo/codemod update
.Reproduction Repo
No response
The text was updated successfully, but these errors were encountered: