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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install scoped packages after upgrading to yarn 1.0.1 from 0.27.5 #4387

Closed
kamthamc opened this issue Sep 10, 2017 · 4 comments
Closed

Comments

@kamthamc
Copy link
Contributor

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

bug

What is the current behavior?
It cannot find the scoped packages. it was working before in yarn 0.27.5

[1/5] 馃攳  Validating package.json...
[2/5] 馃攳  Resolving packages...
error Couldn't find package "@myscope/mypackage" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

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

yarn add @myscope/myPackage

What is the expected behavior?
it should look for scoped packages registry before making a request to npm registry (as I noticed from log) and install
Please mention your node.js, yarn and operating system version.
yarn/1.0.1 node/v8.4.0 MacOSX/10.12.6

@runk
Copy link

runk commented Sep 11, 2017

Having the same problem, check below:

$ yarn add @orgname/logger --verbose
yarn add v1.0.1
verbose 0.974 Checking for configuration file "/Users/runk/project/.npmrc".
verbose 0.974 Checking for configuration file "/Users/runk/.npmrc".
verbose 0.975 Found configuration file "/Users/runk/.npmrc".
verbose 0.976 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.977 Checking for configuration file "/Users/runk/project/.npmrc".
verbose 0.978 Checking for configuration file "/Users/runk/.npmrc".
verbose 0.981 Checking for configuration file "/Users/runk/.npmrc".
verbose 0.984 Found configuration file "/Users/runk/.npmrc".
verbose 0.988 Checking for configuration file "/Users/.npmrc".
verbose 1.001 Checking for configuration file "/Users/runk/project/.yarnrc".
verbose 1.002 Checking for configuration file "/Users/runk/.yarnrc".
verbose 1.003 Found configuration file "/Users/runk/.yarnrc".
verbose 1.004 Checking for configuration file "/usr/local/etc/yarnrc".
verbose 1.01 Checking for configuration file "/Users/runk/project/.yarnrc".
verbose 1.017 Checking for configuration file "/Users/runk/.yarnrc".
verbose 1.02 Checking for configuration file "/Users/runk/.yarnrc".
verbose 1.02 Found configuration file "/Users/runk/.yarnrc".
verbose 1.022 Checking for configuration file "/Users/.yarnrc".
verbose 1.041 current time: 2017-09-11T01:25:18.072Z
[1/5] 馃攳  Validating package.json...
[2/5] 馃攳  Resolving packages...
verbose 2.287 Performing "GET" request to "https://registry.yarnpkg.com/@orgname%logger".
verbose 3.304 Request "https://registry.yarnpkg.com/@orgname%logger" finished with status code 200.
[3/5] 馃殮  Fetching packages...
verbose 3.785 Performing "GET" request to "https://registry.yarnpkg.com/@orgname/logger/-/logger-2.4.0.tgz".
verbose 3.974 Performing "GET" request to "https://registry.yarnpkg.com/@orgname/api-client/-/api-client-4.18.0.tgz".
verbose 5.352 Error: https://registry.yarnpkg.com/@orgname/logger/-/logger-7.9.0.tgz: Request failed "404 Not Found"
    at Request.<anonymous> (/usr/local/Cellar/yarn/1.0.1/libexec/lib/cli.js:57662:26)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:189:7)
    at Request.module.exports.Request.onRequestResponse (/usr/local/Cellar/yarn/1.0.1/libexec/lib/cli.js:118210:10)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:189:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:522:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at TLSSocket.socketOnData (_http_client.js:411:20)
    at emitOne (events.js:96:13)
error An unexpected error occurred: "https://registry.yarnpkg.com/@orgname/logger/-/logger-7.9.0.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/runk/project/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Interesting thing is auth worked for meta information (my guess):

verbose 3.304 Request "https://registry.yarnpkg.com/@orgname%logger" finished with status code 200.

but failed for the tarball download.

No changes were made in the way .npmrc is configured. The only content in it is

//registry.npmjs.org/:_authToken=censored

yarn config as below

$ yarn config list
yarn config v1.0.1
info yarn config
{ 'version-tag-prefix': 'v',
  'version-git-tag': true,
  'version-git-sign': false,
  'version-git-message': 'v%s',
  'init-version': '1.0.0',
  'init-license': 'MIT',
  'save-prefix': '^',
  'ignore-scripts': false,
  'ignore-optional': false,
  registry: 'https://registry.yarnpkg.com',
  'strict-ssl': true,
  'user-agent': 'yarn/1.0.1 npm/? node/v7.6.0 darwin x64',
  email: 'deadrunk@gmail.com',
  lastUpdateCheck: 1505084936033,
  username: 'runk',
  'auth-token': 'censored' }
info npm config
{ 'cache-min': '999999',
  email: 'deadrunk@gmail.com',
  'cache-lock-wait': '100000',
  'cache-lock-stake': '100',
  'cache-lock-stale': '60000',
  spin: false,
  'strict-ssl': true,
  '//registry.npmjs.org/:_authToken': 'censored',
  'auth-token': 'censored' }

@kamthamc kamthamc changed the title Issue with installing scoped packages after upgrading to yarn 1.0.1 from 0.27.5 Cannot install scoped packages after upgrading to yarn 1.0.1 from 0.27.5 Sep 11, 2017
@runk
Copy link

runk commented Sep 11, 2017

.. yarn@0.28 has the same issue

@kamthamc
Copy link
Contributor Author

I suspect the following commit caused the issue cbb27f4#diff-3aebe0cb09fdaf76a6f7303534a3ee26
src/resolvers/registries/npm-resolver.js Line 91

@kamthamc
Copy link
Contributor Author

sorry for duplicate issue #4366

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