title: How can I use a Svelte component lib which use other package in it?
body: <p>I am making a component lib 'svelte-element-ui' with svelte, and this lib use some other packages like popperJs.</p>
  <p>when I publish my component lib to npmjs, the package.json file like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;name&quot;: &quot;svelte-element-ui&quot;,
    &quot;files&quot;: [
      &quot;src/index.ts&quot;,
      &quot;packages&quot;,
      &quot;static&quot;,
      &quot;dist&quot;
    ],
    &quot;devDependencies&quot;: {
      &quot;@popperjs/core&quot;: &quot;^2.9.1&quot;,
    },
    &quot;svelte&quot;: &quot;src/index.ts&quot;,
    &quot;main&quot;: &quot;src/index.ts&quot;,
    &quot;typings&quot;: &quot;types/index.d.ts&quot;,
    &quot;author&quot;: &quot;koory1st&quot;,
    &quot;license&quot;: &quot;MIT&quot;,
  }
  </code></pre>
  <p>And I want to use this component lib in some other svelte web site project like svelte-kit, so I import it into the svelte-kit.</p>
  <pre class="lang-js prettyprint-override"><code>import { SeuSubMenu } from 'svelte-element-ui';
  </code></pre>
  <p>but I got the error when I visit the page:</p>
  <blockquote>
  <p>Failed to resolve import &quot;@popperjs/core&quot; from &quot;node_modules/.pnpm/registry.nlark.com+svelte-element-ui@1.3.12/node_modules/svelte-element-ui/packages/util/SveltePopperJs.ts&quot;. Does the file exist?</p>
  </blockquote>
  <p>The relation like this:</p>
  <p><a href="https://i.stack.imgur.com/8JcKv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8JcKv.png" alt="enter image description here" /></a></p>
  <p>Anyone can help me solve this problem?</p>
  <p><a href="https://github.com/koory1st/svelte-element-ui" rel="nofollow noreferrer">Here is the source</a></p>
  <p>Hope you can find more information with the source.</p>