Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configure yarn to use the npm registry directly
# Remove all settings in the .npmrc except the required auth token setting.
echo '//${NPM_TOKEN}' > .npmrc
# Create a new .yarnrc that specifies the npm registry, or append to an existing one.
echo 'registry:' >> .yarnrc
# Remove and regenerate the yarn.lock. This should be identical to running `yarn upgrade`.
# If you are uncomfortable regenerating the yarn.lock file, you can comment out the next
# two lines and try manually finding and replacing '' with
# ''
rm yarn.lock
# You can check that the registry has been set correctly by running `yarn config list`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment