Skip to content

Read registry from npm config instead of hard-wiring to npmjs.org in node-package-manager #3866

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

Closed
lambourn opened this issue Sep 4, 2018 · 5 comments · Fixed by #3882
Closed
Assignees
Labels
Milestone

Comments

@lambourn
Copy link

lambourn commented Sep 4, 2018

We use artifactory as a our internal npm repository. It mirrors npmjs.org and also allow us to push internal npm packages to it.

However, when we do a clean install/build using tns build android the nativescript-cli itself starts a http client to pull the tns-android package from npmjs.org:

const url = `https://registry.npmjs.org/${packageName}`;

this does not work for us.

Ideally, inside the getRegistryPackageData the registry to use should be read from the npm config (.npmrc)

@lambourn
Copy link
Author

lambourn commented Sep 4, 2018

just fixed it locally, happy to open a PR, just submitted my CLA

@rosen-vladimirov
Copy link
Contributor

Hey @lambourn , thanks for reporting the issue and preparing a fix. We'll be glad to review it!

@lambourn
Copy link
Author

lambourn commented Sep 7, 2018

@rosen-vladimirov no permission for me to push my branch

@rosen-vladimirov
Copy link
Contributor

Hey @lambourn ,
You have to fork the repo and create a pull request from the fork. As you have already cloned the current repo, you can fork it and just change the origin remote in your local copy:

$ git remote -v # this will print the current origin, which probably points to CLI
$ git remote set-url origin <the url of your fork>
$ git remote -v # this will print the current origin, which must now point to your fork of CLI
$ git push origin <your branch>

After that you can open your GitHub repository and create a PR - GitHub will allow you to target CLI's original repository and this way you'll create a PR in this repo.

More information can be found here and here

@lambourn
Copy link
Author

thanks @rosen-vladimirov - it looked as if I'd need to sign the CLA but if opening the PR from the fork works then that's also fine.

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

Successfully merging a pull request may close this issue.

3 participants