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

Remove publishConfig block from package.json #92

Open
yrtimiD opened this issue Nov 18, 2019 · 3 comments
Open

Remove publishConfig block from package.json #92

yrtimiD opened this issue Nov 18, 2019 · 3 comments

Comments

@yrtimiD
Copy link

yrtimiD commented Nov 18, 2019

Having publishConfig with hardcoded global registry makes impossible to upload this package to custom local offline mirrors (usually used by companies):

"publishConfig":` {
    "registry": "https://registry.npmjs.org/"
  }

Removing it should not affect regular version release since registry.npmjs.org is default in npm.

@mridgway
Copy link
Owner

I added this to the config because I am also at a company that has an internal registry and I routinely forget to specify the correct registry when publishing this library to the open source registry.

If you want to publish it to your own registry you should be able to run npm publish --registry https://registry.mycompany.com. I didn't think the publishConfig overrode the cli parameter, but I could be mistaken.

@yrtimiD
Copy link
Author

yrtimiD commented Nov 27, 2019

Right, specifying explicit registry should work, but makes life harder. We usually use only .npmrc files, and never mention registry explicitly.

Anyway, it's your call, feel free to close the issue :)

@hazolsky
Copy link

hazolsky commented Jan 10, 2020

I ran into the same issue recently and specifying --registry didn't help either.

Maybe it'd be more convenient for both you and community if registry URL was stored in per-project config file (/path/to/my/project/.npmrc)?

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

3 participants