This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #423
Along with many open-ended Netlify support request threads/comments, eg:
https://answers.netlify.com/t/support-guide-using-private-npm-modules-on-netlify/795/57
This answer on the Netlify forums best explains why the current
NPM_TOKEN
and.npmrc
committed to the repo is not a great solution.Many of the comments I found across the web & the above forum posts are looking for a custom "pre install" step, but for the most common use case requested (add a custom npmrc file before install), that seems like an over-complication.
This PR adds two new options,
GITHUB_PACKAGES_TOKEN
environment variable that creates an npmrc file for the GitHub packages registry.NPM_RC
environment variable that lets you create a custom npmrc file, especially useful when you want to define custom scoped registries.For us to review and ship your PR efficiently, please perform the following steps:
A picture of a cute animal (not mandatory, but encouraged)