question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`regression`: npmrc should be obeyed during nx migrate

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

4reactions
colinsczcommented, Jun 24, 2022

Hi @AgentEnder

  1. Is there an update on when this ticket will be fixed/merged?

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.

  1. Is there any workaround you have in mind or you can suggest to do nx migrations in the meantime untils this is fixed?

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

  • Windows 10
  • nx - 13.10.5
  • node - 16.14.2
  • npm - 8.5.0
2reactions
medmanscommented, Nov 29, 2022

any news about this bug ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's new in Nx 15?. Nx v15 is finally here! Let's go… - Nx Blog
How to Update Nx. Updating Nx is done with the following command and will update your Nx workspace dependencies and code to the...
Read more >
nrwl/nx-plugin: Versions - Openbase
Full version history for @nrwl/nx-plugin including change logs. ... core: npmrc should be obeyed during nx migrate (#6781) (b416bb6) ...
Read more >
npm packages in the Package Registry - GitLab Docs
Your package should now publish to the Package Registry. Publishing a package via a CI/CD pipeline. Authenticating via the .npmrc. Create or edit...
Read more >
Update your Nx workspace with Nx migrations | egghead.io
First, I'm going to open up your console, and I'm running that Nx migrate latest command. What that does is it analyzes all...
Read more >
node.js - confused about .yarnrc and .npmrc - Stack Overflow
Should I create a .yarnrc file? If so, how can I convert .npmrc above to .yarnrc ? Didn't find configurations such as _auth...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found