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

"registry" now requires a trailing slash to work correctly #4339

Closed
pselden opened this issue Sep 7, 2017 · 4 comments · Fixed by #4350
Closed

"registry" now requires a trailing slash to work correctly #4339

pselden opened this issue Sep 7, 2017 · 4 comments · Fixed by #4350
Assignees
Labels

Comments

@pselden
Copy link

pselden commented Sep 7, 2017

Do you want to request a feature or report a bug?
bug

What is the current behavior?
When using the "registry" parameter in .npmrc and .yarnrc, you must now use a trailing slash. Otherwise it will fail with an error "Couldn't find package "" on the "npm" registry."

If the current behavior is a bug, please provide the steps to reproduce.

  1. Create .yarnrc with the following contents:
registry "https://my-private-repo.com/artifactory/npm"
  1. yarn add react --verbose
  2. See the following:
verbose 0.59 Performing "GET" request to "https://my-private-repo.com/artifactory/react".

Note -- there is no /npm on the end

What is the expected behavior?
Should make a get request to "https://my-private-repo.com/artifactory/npm/react"

Please mention your node.js, yarn and operating system version.
yarn 1.0.1
node 8.4.0
OSX Sierra

Note -- this can be worked around by adding a trailing slash -- but this was working correctly in v0.27.5

@nynexman4464
Copy link

Just ran into this. Can confirm adding the / fixed it, but was really confused for a while why I couldn't install something that seemed to be in the registry.

@arosenthal-r7
Copy link

yea can also confirm that this used to work fine without a trailing slash in my .npmrc, and now i need the trailing slash...

@kaylie-alexa kaylie-alexa self-assigned this Sep 8, 2017
BYK added a commit that referenced this issue Sep 8, 2017
**Summary**

Fixes #4339. Also fixes handling of upper-case registry names.

**Test plan**

Added unit tests for `NpmRegistry.prototype.getRequestUrl()`.
@BYK BYK assigned BYK and unassigned kaylie-alexa Sep 8, 2017
@BYK
Copy link
Member

BYK commented Sep 8, 2017

Sorry @kaylieEB, took this on since I'm hoping to release 1.0.2 with this fixed.

arcanis pushed a commit that referenced this issue Sep 8, 2017
**Summary**

Fixes #4339. Also fixes handling of upper-case registry names.

**Test plan**

Added unit tests for `NpmRegistry.prototype.getRequestUrl()`.
@kaylie-alexa
Copy link
Member

no worries at all! I was just seeing this bug in prod too, thanks for fixing it quickly!

joaolucasl pushed a commit to joaolucasl/yarn that referenced this issue Oct 27, 2017
**Summary**

Fixes yarnpkg#4339. Also fixes handling of upper-case registry names.

**Test plan**

Added unit tests for `NpmRegistry.prototype.getRequestUrl()`.
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.

5 participants