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

Reversion bug: yarn 0.16 no longer able to install scoped packages from private registry #1274

Closed
kyeotic opened this issue Oct 19, 2016 · 5 comments

Comments

@kyeotic
Copy link

kyeotic commented Oct 19, 2016

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

What is the current behavior?
yarn fails with

Trace: 
  TypeError: Cannot use 'in' operator to search for 'latest' in undefined
      at /usr/local/lib/node_modules/yarn/lib/resolvers/registries/npm-resolver.js:62:24
      at next (native)
      at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
      at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
      at new Promise (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:191:7)
      at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12
      at Function.findVersionInRegistryResponse (/usr/local/lib/node_modules/yarn/lib/resolvers/registries/npm-resolver.js:72:7)
      at /usr/local/lib/node_modules/yarn/lib/resolvers/registries/npm-resolver.js:89:34
      at next (native)
      at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)

If the current behavior is a bug, please provide the steps to reproduce.
I have a private registry, which also has a scope.

$ yarn config get registry
http://artifactory.nike.com/artifactory/api/npm/npm-nike//
"dependencies": {
    "@nike/lambda-node-logger": "^0.2.0"
  }

Yarn 0.15.1 can handle this, but yarn 0.16.(0|1) fails.

What is the expected behavior?
Installation should succeed

Please mention your node.js, yarn and operating system version.

Node: 5.7.1
yarn: 15 and 16
OS: Mac Sierra
@jcmorrow
Copy link

jcmorrow commented Oct 20, 2016

I'm experiencing this as well. If I debug the body received on line 60 of npm-resolver.js it looks like the response is:

package-name@1.0.0{ errors: [ { status: 401, message: 'Invalid basic authentication token' } ] }

It sounds like 50aae7d could be related but applying that patch didn't fix it for me.

@wyze
Copy link
Member

wyze commented Oct 24, 2016

Solved by #1356.

@wyze wyze closed this as completed Oct 24, 2016
@jcmorrow
Copy link

@wyze #1356 does provide a cleaner error message, but it doesn't solve the problem causing the error.

@wyze
Copy link
Member

wyze commented Oct 24, 2016

I guess solved wasn't the correct word to use there. But it does touch on the error reported in this issue.

In regards to your specific error you mention above, might want to follow the discussion in #521 in regards to the authentication token.

@jcmorrow
Copy link

It does look like that's a better place to track this issue! Thanks @wyze!

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