title: Private github npm repositories on Netlify
body: <p>I've been trawling documentation on Netlify's site for how to deploy a node application (specifically a Vue application) which has a private npm repository as a dependency.</p>
  <p>I have an .npmrc file setup as follows:</p>
  <pre><code>//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
  @my:registry=https://npm.pkg.github.com
  </code></pre>
  <p>I also set the GITHUB_TOKEN variable in my build process's environment variables to the correct value.</p>
  <p>However, the build fails.</p>
  <p>There is an outline of how to achieve a successful build with a private Github package repository here: <a href="https://docs.netlify.com/configure-builds/repo-permissions-linking/#npm-packages" rel="nofollow noreferrer">https://docs.netlify.com/configure-builds/repo-permissions-linking/#npm-packages</a>.</p>
  <p>However, it's still unclear as to what I need to do <strong>specifically</strong> to both my package.json file and also how to configure the build process' environment variables ...</p>
  <p>Could anyone show me a full working example which doesn't leave me scratching my head?</p>
  <p>Do I add:</p>
  <pre><code>&quot;package-name&quot;: &quot;git+https://&lt;github_token&gt;:x-oauth-basic@github.com/&lt;user&gt;/&lt;repo&gt;.git&quot;
  </code></pre>
  <p>to the dependencies section of the package.json?</p>
  <p>If yes, how do I then hide my &lt;github_token&gt; and provide the build process with this in Netlify?</p>
  <p>How do I also get the same process working locally?</p>
  <p>Why can't Netlify just inject the GITHUB_TOKEN into my .npmrc file so I have parity with my local development environment?</p>