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

Yarn upgrade-interactive not working when package name starts with @ #6727

Closed
msonowal opened this issue Nov 28, 2018 · 15 comments
Closed

Yarn upgrade-interactive not working when package name starts with @ #6727

msonowal opened this issue Nov 28, 2018 · 15 comments
Assignees
Labels

Comments

@msonowal
Copy link

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

Bug
What is the current behavior?

yarn upgrade-interactive v1.12.3
error An unexpected error occurred: "couldnt find @tweenjs/tween.js".
info If you think this is a bug, please open a bug report with the information provided in "/Users/msonowal/Sites/project/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/upgrade-interactive for documentation about this command.

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

use the below dependents in package.json

"dependencies": {
    "@sentry/browser": "4.2.1",
    "@tweenjs/tween.js": "^17.2.0"
}

and run yarn
then run upgrade-interactive
What is the expected behavior?
it should show the list of pacakges
Please mention your node.js, yarn and operating system version.
yarn v1.12.3
OS Mac OS Mojave10.14.1 (18B75)
node v8.12.0

@ghost ghost assigned kaylie-alexa Nov 28, 2018
@ghost ghost added the triaged label Nov 28, 2018
@mbitto
Copy link

mbitto commented Nov 28, 2018

I have a similar issue simply running yarn. All packages starting with @ cannot be installed, for example:
Error: Couldn't find package "@babel/runtime" on the "npm" registry.

@mfrascati
Copy link

Same issue here
error Couldn't find package "@uirouter/angularjs" on the "npm" registry.

strange thing I'm getting an error also with npm i
npm ERR! 401 Unauthorized: @uirouter/[email protected]

@schnubb
Copy link

schnubb commented Nov 28, 2018

don't know if this issue relates to npm registry, but they seem to have a problem with scoped packages too:
https://npm.community/t/can-t-install-scoped-packages-e401-unauthorized/3631/14

@arcanis
Copy link
Member

arcanis commented Nov 28, 2018

A workaround seems to be to logout of the registry, can someone check whether it works for you?

On my side I couldn't reproduce the problem.

@markpradhan
Copy link

I have never logged into npm :/ so it does not work for me.

@markpradhan
Copy link

I don't know if this will help guys, but i got my setup working, i followed the following steps:

I haven't used npm itself for a while but my npm setup seemed broken.
When i tried to perform npm logout or even npm -v it basically threw an error.
Also i was using n as my node version manager.

  • n 5.12 to install an older version (so i can remove all the newer ones)
  • n prune to remove newer version
  • n lts to add a recent version of node (n stable or n latest if that's your thing)
  • npm logout

Everything works like it should.

@schnubb
Copy link

schnubb commented Nov 28, 2018

@markpradhan thanks for the info.
I don't know what it was, I didn't update / downgraded npm. Just changed some lines in my global .npmrc and now its working fine. At least I can't reproduce the error anymore.

@wincent
Copy link
Contributor

wincent commented Nov 28, 2018

I updated node (using brew ugrade node) from v11.2.0 to v11.3.0, but that had no effect. But npm logout followed by npm login indeed fixed the issue.

@arcanis
Copy link
Member

arcanis commented Nov 28, 2018

In the package.community npm chat, @fharper said “We made architectural changes that return 401 with invalid token even if the action didn’t require you to be logged”

Awesome communication ...

@fharper
Copy link

fharper commented Nov 28, 2018

In the package.community npm chat, @fharper said “We made architectural changes that return 401 with invalid token even if the action didn’t require you to be logged”

Awesome communication ...

I agree, we dropped the ball here, sorry. I'll publish an article explaining the situation and will post the link here as soon as it's live.

@manugb
Copy link

manugb commented Nov 28, 2018

with a nexus mirror for private and public modules you have to add an _auth key to the .npmrc file and set always-auth to true. But with @ scoped modules you have to go the the npm registry as nexus was not able to serve those modules by itself.

So with that architectural change I guess we are sending an invalid token (the nexus one) and we are getting the 401 in the @ modules. What should we do here? I cant drop the _auth because of nexus

PS: the npm login/logout is not working in this case

@fharper
Copy link

fharper commented Nov 28, 2018

@arcanis
Copy link
Member

arcanis commented Nov 28, 2018

@fharper Thanks - can we however have a specific date for "soon"? One reason you might want to set one in stone now is that if we (the community as a whole, but Yarn in particular) know that a specific change is being rolled out we know how to triage and route potential issues we see.

Additionally, with the holidays approaching, I'd also recommend you to make sure that you won't try rolling it out too close to the end of the year.

My two cents 🙂

@fharper
Copy link

fharper commented Nov 30, 2018

@arcanis as soon as I have more information from the product team, I'll let you know.

@msonowal
Copy link
Author

msonowal commented Dec 1, 2018

Its fixes, and was occuring due to that infrastructure change on that time as per the @fharper

@msonowal msonowal closed this as completed Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants