nx: `regression`: npmrc should be obeyed during nx migrate
Looks like it was fixed before and resurrected again: https://github.com/nrwl/nx/pull/6781
Current Behavior
Calling nx migrate 'my-package' does not obey registry settings from .npmrc. This leads to things like trying to pull latest from npm, or yarn registry instead of the registry pointed to by the workspace.
If an enterprise workspace was using a private registry, and had a custom nx plugin, they would not be able to use nx migrate for their internal migration scripts.
Expected Behavior
Registries and authorization headers in .npmrc should be obeyed by nx migrate
Steps to Reproduce
- create .npmrc
- link to the local registry
nx migrate 'my-package'
Failure Logs
- nx migrate ignoring npmrc and failing when can’t fone package on npm or yarn registry.
Environment
- macos Monterey 12.4
- nx - 14.0.3
- node - 16.14.2
- yarn - 1.22.11
- npm - 8.5.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 15 (8 by maintainers)
Hi @AgentEnder
I am also developing inside a company network and this causes a lot of trouble because Nx is ignoring the defined proxy configurations and it’s not usable for migrations/updates. In my company certain operations outside of the defined configurations/folders in the *.npmrc are completely blocked.
I saw there has been a release for Nx 14 but unless this is patched in Nx 13 I would have to do the whole migration manually for Angular 14 and Nx 14 which would be frustrating. Worst case we would have to abandon Nx completely as this generates more overhead then benefits as of now…
I appreciate any idea on how to work around this - unfortunately I cannot move the project outside of the company network, that would have been a way to solve it temporarily.
Thanks!
Environment
any news about this bug ?
Hi @AgentEnder
Any rough timeline on when we can expect a fix to be shipped? A previously working feature was falsly removed and the current workaround is not clean.