title: How import module dependencies from other npm dependency?
body: <p>I have the following question. Currently I want to build a NPM module which this expected behaviour: </p>
  
  <p>Once I've installed it, all its dependencies would work perfectly in the project only import them.</p>
  
  <p>First of all, what I have is this:</p>
  
  <p><a href="https://i.stack.imgur.com/WZvME.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WZvME.png" alt="enter image description here"></a></p>
  
  <p>I have "my-module" project as the dependencies modules I want with that specific versions.</p>
  
  <p>On the other hand I have a project which imports it as we can see.</p>
  
  <p>Inside my project I want to write, for example, the following code and finally run it:</p>
  
  <pre><code>import {Calendar} from 'primereact/calendar';
  </code></pre>
  
  <p>How could I deal with this trouble?</p>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT: My project's package.json is this</p>
  
  <pre><code>{
    "name": "my-project",
    "version": "0.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "dev": "next src",
      "build": "next build src",
      "start": "next start src"
    },
    "license": "ISC",
    "dependencies": {
      "next": "^9.0.3",
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "@ascope/my-module": "file://../my-module"
    }
  }
  </code></pre>
  
  <p>Also my-module's package.json:</p>
  
  <pre><code>{
    "name": "my-module",
    "version": "0.0.1",
    "main": "index.js",
    "scripts": {
      "test": "exit 1"
    },
    "license": "ISC",
    "bundledDependencies": [
      "primereact",
      "rxjs"
    ],
    "dependencies": {
      "primereact": "^3.1.8",
      "rxjs": "^6.5.2"
    },
    "peerDependencies": {
      "primereact": "^3.1.8",
      "rxjs": "^6.5.2"
    }
  }
  </code></pre>