If you're using Yarn 2+, you need to create a .yarnrc.yml file, which is more like this:
npmScopes: [NPM_ORG]: npmRegistryServer: "[NPM_REGISTRY]" npmAuthToken: "[NPM_TOKEN]"