# How to export shared methods/class in stenciljs?

**URL:** <https://forum.ionicframework.com/t/how-to-export-shared-methods-class-in-stenciljs/238668>\
**Category:** Stencil\
**Created:** [December 25, 2023, 10:39am UTC](https://forum.ionicframework.com/t/how-to-export-shared-methods-class-in-stenciljs/238668 "2023-12-25T10:39:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huyit88](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@huyit88](https://forum.ionicframework.com/u/huyit88)\
**Post date:** [December 25, 2023, 10:39am UTC](https://forum.ionicframework.com/t/how-to-export-shared-methods-class-in-stenciljs/238668/1 "2023-12-25T10:39:35Z")

</div>

Hi Team,  
I want to publish my shared method in the library which is build by stenciljs then other developer can reuse it.

I research on stencilj website and forum, but not find any topic.  
With stackoverflow, i found few similar issue:

> <https://stackoverflow.com/questions/70180921/stencil-js-how-to-also-distribute-a-set-of-shared-methods>

After export my util in index.ts, it’s build successfully.

```auto
export * from './components';
export * from './components/my-util';

```

But when importing my-util in other project to reuse it. I got the strange error

```auto
import { myUtil } from 'my-library';

```

`Error: Module not found: Error: Package path . is not exported from package ...`

Do we have any guideline to export set of shared method/class …?  
How can i fix above error?  
Thank for help.
