Reputation: 3473
I'm relatively recently researching npm and yarn for managing javascript packages. For various reasons (mostly obvious to yarn users) I think I would like to settle on yarn long term. For the past several days, while playing, after my first use of yarn login
I have had no trouble using yarn publish
and yarn add
(or yarn upgrade
) to publish and install private scoped modules through the npm registry. Today, when starting to work on a full build package, used yarn logout
to logout, and then tried logging in again with yarn login
. But now, I am completely unable to use yarn publish
to publish my packages or yarn install
to install any privately scoped packages. npm works fine.
I'm baffled as to what has gone wrong.
Somehow the authentication is not working correctly and I don't see what I have done to break it. That said, I don't understand it very well either.
Upvotes: 2
Views: 4310
Reputation: 9705
Try npm login
. It will create a login token that is persistent, and yarn
will also be able to use it.
Upvotes: 3