I created an .npmrc file that configured my to work with VSTS pacakge feed, but all my public dependencies won't install (you know, react, lodash ...)
Seems like once I configure .npmrc file to point to my private feed, all public packages are no longer accessible.
since npm, contrary to Nuget, does not support multiple package registries (here's a related SA question), i'm currently stuck with running npm install twice - once without and .npmrc file to get the public dependencies, and once with the .npmrc file to get the private.
Doesn't VSTS mirror / proxy the public registry? if not - am I expected to run npm install twice with 2 differenct versions of the .npmrc file?
The easy way to deal with it is enable upstream sources for your feed. After this, it will look for package form npmjs.com if the package isn’t existing in your feed.
Another way is that you can specify registry in the command, for example: npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
.
On the other hand, we can just add the feed to the project’s .npmrc file, not in user’s folder (c:\Users[username]), then it uses public registry if current context is in the other path.