title: Setting up git npm dependency for debugging
body: <p>First time trying to do this, so not really sure what I am doing or how to set it up.</p>
  
  <p>I need to debug a library I am using in my application. Originally, I had it installed with <code>npm install @react-pdf/renderer</code>. That wouldn't work well for debugging and I came across this answer describing how to work on a dependency if you need to make modifications to it:</p>
  
  <p><a href="https://stackoverflow.com/a/13302095/3123109">https://stackoverflow.com/a/13302095/3123109</a></p>
  
  <p>So now I'm doing <code>npm install https://github.com/diegomura/react-pdf/tarball/master</code> which puts a copy of the repo into my <code>node_modules</code>. </p>
  
  <p>I was under the impression it would "just work" after doing this. Of course not that simple...</p>
  
  <hr>
  
  <p><strong>What I have tried</strong></p>
  
  <ol>
  <li><p>I have NPM running on my application. The first error that comes up is <code>Module not found: Error: Can't resolve '@react-pdf/renderer'</code> in my component where it is contained. Ok, so updated my <code>import</code> to the following to look at the <code>index.js</code> of the library: <code>import { Document } from '@react-pdf/renderer/src</code>.</p></li>
  <li><p>Clears up that message. Now I get:</p>
  
  <pre><code>ERROR in /mnt/c/Users/User/projects/current/client/node_modules/@react-pdf/renderer/src/elements/Page.js 11:22
  Module parse failed: Unexpected token (11:22)
  You may need an appropriate loader to handle this file type.
  |
  | class Page extends Base {
  &gt;   static defaultProps = {
  |     size: 'A4',
  |     orientation: 'portrait',
  @ /mnt/c/Users/User/projects/current/client/node_modules/@react-pdf/renderer/src/elements/index.js 3:0-26 13:8-12
  @ /mnt/c/Users/User/projects/current/client/node_modules/@react-pdf/renderer/src/index.js
  </code></pre></li>
  </ol>
  
  <p>Looking into it, it sounds like it is a <code>babel-preset-stage-0</code> issue:</p>
  
  <p><a href="https://stackoverflow.com/a/41412906/3123109">https://stackoverflow.com/a/41412906/3123109</a></p>
  
  <p>Ok, I add that to <code>.babelrc</code> in the <code>@react-pdf/renderer</code> since it is missing. Same issue.</p>
  
  <ol start="3">
  <li><p>I guess I need to add it to my <code>.babelrc</code> which also requires doing <code>npm install --save-dev babel-preset-stage-0</code> (even though I don't use that in my app, but whatever). Get this error:</p>
  
  <pre><code>ERROR in ../react/index.jsx
  Module build failed (from /mnt/c/Users/User/projects/current/client/node_modules/babel-loader/lib/index.js):
  Error: Plugin/Preset files are not allowed to export objects, only functions.
  </code></pre></li>
  </ol>
  
  <p>Apparently had to do with mixing Babel 6 with Babel 7, the former being related to the <code>stage-0</code> and the latter being what I am using in my application.</p>
  
  <p><a href="https://stackoverflow.com/a/49183337/3123109">https://stackoverflow.com/a/49183337/3123109</a></p>
  
  <p>Ok, apparently a dependency issue going on that I'm not sure how to resolve given I've never done this before. That being said, when I did the <code>npm install https://github.com/diegomura/react-pdf/tarball/master</code>, it did install the dependencies in <code>node_module</code> for <code>@react-pdf/renderer</code>.</p>
  
  <hr>
  
  <p><strong>Questions</strong></p>
  
  <ol>
  <li><p>Do I need to be installing the dependencies for <code>@react-pdf/renderer</code> even though it looks like they were installed with <code>npm install https://github.com/diegomura/react-pdf/tarball/master</code>?</p></li>
  <li><p>If so, where? Do the dependencies need to be added to my app (via adding them to my <code>package.json</code>) or within the <code>node_modules/@react-pdf/renderer</code> directory via <code>npm install</code> in that directory?</p></li>
  <li><p>Do I need to be running <code>npm run ... --watch</code> for <code>@react-pdf/renderer</code> in addition to running it for my app?</p></li>
  <li><p>Or, do I just need to be taking the compiled JS files for <code>@react-pdf/renderer</code>, reading them into my app, then recompiling the JS if I need to make changes?</p></li>
  </ol>