How to set auth token for yarnrc.yml on Windows without hardcoding?

Viewed 7

Within some projects that I'm working on, we're setting our github auth token for our yarnrc.yml file within the zsh or zshrc files. Obviously, this works out when I'm on my Macbook but I tend to prefer using my PC at home. What would be the equivalent of setting this environment variable on a PC without having to hard code it?

npmScopes:
  project:
    npmAlwaysAuth: true
    npmAuthToken: "${NPM_TOKEN}"
    npmRegistryServer: "https://npm.pkg.github.com"

When running my yarn command I receive this type of error: Usage Error: Environment variable not found (NPM_TOKEN) in C:\Projects\ProjectName\.yarnrc.yml

0 Answers
Related