title: How to debug npm modules?
body: <p>Normally you <code>yarn/npm install react</code>, then use it with <code>import React from 'react'</code></p>
  
  <p>Say you want to debug a React source and you clone a GitHub repo.</p>
  
  <p>How do you use the source in your project instead of the lib version?</p>
  
  <ul>
  <li>edit</li>
  </ul>
  
  <p>To further develop philipheinser's answer, here's what I encountered with doing <code>npm link draft-js-mention-plugin</code></p>
  
  <p><code>npm link</code> seems to run <code>npm run build</code> which is the <code>scripts</code> command in the <code>package.json</code> that you want to link.  </p>
  
  <p>with <code>draft-js-mention-plugin</code>, npm run build runs <code>../node_modules/.bin/rimraf lib</code> and I had to go up a directory and run <code>npm install</code> to install the <code>rimraf</code></p>
  
  <p><code>draft-js-mention-plugin</code> has parent <code>draft-js-plugins</code> and it has its own package.json</p>