I would like to use npmAuthToken
from .yarnrc.yml
which is located in my home directory
~/.yarnrc.yml
content
npmScopes:
company:
npmAuthToken: NpmToken.token
~/Project/MyProject/.yarnrc.yml
content
enableGlobalCache: true
logFilters:
- code: YN0013
level: discard
nodeLinker: node-modules
npmScopes:
company:
npmAlwaysAuth: true
npmPublishRegistry: "https://company-url"
npmRegistryServer: "https://company-url"
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-3.1.0.cjs
However, when I try to run yarn install
it fails on the resolution step with the following message: Invalid authentication (as an anonymous user)
.
It worked fine with yarn 1 and ~/.npmrc
file. Now we're going to migrate yarn 2, but I stuck with this issue. Any ideas on how to solve this? Thanks!