title: How to install a npm package from local folder and develop on both the folder simultaneously?
body: <p>I am working on a React project and using Webpack to compile the code. This project contains a lot of common components which is installed in other projects across the organisation using <a href="https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly">npm install private git repository</a>.</p>
  <p>Package.json of other project looks like this:</p>
  <p><code>&quot;@mypackage/my-package-name&quot;: &quot;git+ssh://git@github.com:git-handle/git-repo.git&quot;,</code></p>
  <p>And in Webpack config I am compiling it by excluding it from node modules and it works fine.</p>
  <pre><code>module: {
  rules: [
    {
      test: /\.(js|jsx)$/,
      exclude: /(node_modules(?!\/@mypackage))/,
      use: [
        {
          loader: 'babel-loader',
          query: {
            presets: ['@babel/react'],
          },
        },
      ],
    },
   ],
  },
  </code></pre>
  <p>Now when I want to update the code of common component from the global package I have to reinstall the whole package to check the changes.</p>
  <p>One workaround for that is to edit the node_modules but then I have to redo those changes to my global package and again do the reinstalling process at the end ( also it doesn't keep the git history to track what changes needs to be done ).</p>
  <p>I have came across <a href="https://stackoverflow.com/questions/50155052/install-access-a-local-folder-as-a-npm-module">npm install from local</a> and <a href="https://stackoverflow.com/questions/8088795/installing-a-local-module-using-npm">npm link local folder</a> answer but facing the same issue which is not resolved</p>
  <p>Updated package.json</p>
  <p><code>&quot;@mypackage/my-package-name&quot;: &quot;file:../my-package-name&quot;</code></p>
  <p>I got the following errors</p>
  <p><code>Module not found: Can't resolve '@mypackage/my-package-name/Navbar' in 'path/to/folder/'</code></p>
  <p><code>SassError: File to import not found or unreadable: bootstrap/variables</code></p>
  <p><code>Module not found: Error: Can't resolve 'js-cookie'</code></p>
  <p>These errors are may due to an incomplete compilation of code from local folder.</p>
  <p>My folder structure is something like this</p>
  <pre><code>= (my-package)
    - package.json
    - ...
    = src
      - index.js
  = (other-project)
    - package.json
    - ...
    = src
      - index.js
  </code></pre>
  <p>I am looking for a solution by which I can point the package to a local folder( mypackage global folder ) and synchronize the changes in both the projects.</p>