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

How to have yarn dependencies from different registries for different packages in the package.json? #8781

Open
AnirudhNv opened this issue Feb 9, 2022 · 2 comments

Comments

@AnirudhNv
Copy link

I have two registries under consideration .
registry one: https://npm.example.com/ registry
registry two: https://npm.client.com/

So most of dependencies are installed from the first registry. But for one dependency Eg: icons , this should be picked from another URL.

In my package.json

"dependencies": {
"@angular/animations": "11.2.14",
"@angular/cdk": "11.2.13",
// and so on

"icons-library":"1.0.0" 
}

So here only for icons-library i need it to look for another registry URL. ie https://npm.client.com/

I have tried

yarn install
yarn config set icons-library https://npm.client.com
yarn install

But this doesn't seem to be working.

Any corrections or recommendations are welcome. TIA

@jyeric

This comment was marked as spam.

@jyeric
Copy link

jyeric commented Feb 19, 2022

I have two registries under consideration . registry one: https://npm.example.com/ registry registry two: https://npm.client.com/

So most of dependencies are installed from the first registry. But for one dependency Eg: icons , this should be picked from another URL.

In my package.json

"dependencies": {
"@angular/animations": "11.2.14",
"@angular/cdk": "11.2.13",
// and so on

"icons-library":"1.0.0" 
}

So here only for icons-library i need it to look for another registry URL. ie https://npm.client.com/

I have tried

yarn install
yarn config set icons-library https://npm.client.com
yarn install

But this doesn't seem to be working.

Any corrections or recommendations are welcome. TIA

I solved it by modifying/deleting yarn.lock file.

reference: #4862

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

No branches or pull requests

2 participants