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

404 not found on private packages after cache clean #4410

Closed
shousper opened this issue Sep 12, 2017 · 2 comments
Closed

404 not found on private packages after cache clean #4410

shousper opened this issue Sep 12, 2017 · 2 comments

Comments

@shousper
Copy link

shousper commented Sep 12, 2017

What is the current behavior?

error An unexpected error occurred: "https://registry.yarnpkg.com/<snip>.tgz: Request failed \"404 Not Found\"".

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

You will need a private package hosted on npmjs.org (not sure if this is a factor, but ours are).

Follow the below with an empty directory to reproduce.

$ export PRIVATE_PACKAGE="@blah/private-package"
$ yarn --version
1.0.1
$ yarn cache clean
yarn cache v1.0.1
success Cleared cache.
✨  Done in 0.04s.
$ yarn add $PRIVATE_PACKAGE
yarn add v1.0.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
└─ @blah/private-package@1.0.0
✨  Done in 1.50s.
$ rm -rf node_modules/
$ yarn cache clean
yarn cache v1.0.1
success Cleared cache.
✨  Done in 0.05s.
$ yarn install
yarn install v1.0.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@blah/private-package/-/private-package-1.0.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/me/testing/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
$ wget https://nightly.yarnpkg.com/yarn-1.0.1-20170911.1958.js
--2017-09-12 11:27:43--  https://nightly.yarnpkg.com/yarn-1.0.1-20170911.1958.js
Resolving nightly.yarnpkg.com... 104.16.63.173, 104.16.62.173, 104.16.61.173, ...
Connecting to nightly.yarnpkg.com|104.16.63.173|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/javascript]
Saving to: ‘yarn-1.0.1-20170911.1958.js’

yarn-1.0.1-20170911.1958.js                                             [  <=>                                                                                                                                                               ]   3.62M  17.6MB/s    in 0.2s

2017-09-12 11:27:43 (17.6 MB/s) - ‘yarn-1.0.1-20170911.1958.js’ saved [3799701]
$ ./yarn-1.0.1-20170911.1958.js install
yarn install v1.0.1-20170911.1958
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@blah/private-package/-/private-package-1.0.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/me/testing/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I also performed these same steps for versions from 0.24.x to 0.28.x with varied results:

  • 0.24.6 💚
  • 0.25.4 💚
  • 0.26.1 🔴
  • 0.27.5 💚
  • 0.28.4 🔴

My .npmrc looks exactly like this:

//registry.npmjs.org/:_authToken=${NPM_TOKEN}

My yarn config list output looks like this (when using yarn 1.0.1):

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/v6.10.2 darwin x64',
  lastUpdateCheck: 1505177722420 }
info npm config
{ '//registry.npmjs.org/:_authToken': '<nope>' }
✨  Done in 0.04s.

What is the expected behavior?

It should install private packages, specified in yarn.lock without cache.

We actually have this problem and #3922 preventing us from moving from 0.24.x, but #3922 we can probably work around. This issue we cannot :(


node: v6.10.2
npm: 5.4.1
yarn: 1.0.1 and 1.0.1-20170911.1958
OS: macOS 10.12.6

@kamthamc
Copy link
Contributor

I think it’s a duplicate of #4366

@BYK
Copy link
Member

BYK commented Sep 12, 2017

Closing as duplicate of #4366.

@BYK BYK closed this as completed Sep 12, 2017
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