Skip to content
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

Closed
denexapp opened this issue Mar 10, 2023 · 2 comments · Fixed by #9803

Comments

@denexapp
Copy link

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

@denexapp denexapp added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Mar 10, 2023
@arlyon
Copy link
Contributor

arlyon commented Mar 10, 2023

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!

@arlyon arlyon added pkg: turbo-codemod story and removed needs: triage New issues get this label. Remove it after triage kind: bug Something isn't working labels Mar 10, 2023
@anthonyshew anthonyshew removed the story label Feb 22, 2024
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
@denexapp
Copy link
Author

denexapp commented Feb 8, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants