yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.43k stars 2.72k forks source link

upgrade-interactive url-encoding registry urls incorrectly #5252

Open cwmoo740 opened 6 years ago

cwmoo740 commented 6 years ago

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

Bug

Current behavior and steps to reproduce

package.json

"devDependencies": {
    "jest": "^22.05",
    ...
}

yarn.lock

jest@^22.0.5:
  version "22.0.5"
  resolved "https://registry.yarnpkg.com/jest/-/jest-22.0.5.tgz#552b4104dea91d63fa4f4f39443337d061f63019"
  dependencies:
    jest-cli "^22.0.5"

Running yarn upgrade-interactive and selecting the latest version of jest:

? Choose which packages to update. jest@22.1.4
info Installing "devDependencies"...
[1/4] Resolving packages...
Done in 7.13s.
Error: https://registry.yarnpkg.com/@babel%2fcode-frame: User not found

What is the expected behavior? Manually changing the package.json to "jest": "^22.1.4" and running yarn works as expected and installs the latest version of jest.

It properly installs https://registry.yarnpkg.com/@babel/code-frame

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

Linux, yarn v1.3.2, node 8.9.4

cwmoo740 commented 6 years ago

in the same environment,

yarn info @babel/code-frame
yarn info v1.3.2
error An unexpected error occurred: "https://registry.yarnpkg.com/@babel%2fcode-frame: User not found".

whereas

npm info @babel/code-frame works as expected

cwmoo740 commented 6 years ago

Not sure what changed, but I cleared and then reset all of my yarn config settings and the cache, and both commands seem to be working as expected now.

I was also running into a problem listed in another issue:

error An unexpected error occurred: "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.37.tgz: Request failed \"404 Not Found\"".

but this was also solved.