# DOM.createElement is not a function when importing local library

**URL:** <https://discourse.aurelia.io/t/dom-createelement-is-not-a-function-when-importing-local-library/4774>\
**Category:** Help Requests\
**Created:** [May 20, 2022, 6:34am UTC](https://discourse.aurelia.io/t/dom-createelement-is-not-a-function-when-importing-local-library/4774 "2022-05-20T06:34:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mreiche](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/mreiche/32/1912_2.png) [@mreiche](https://discourse.aurelia.io/u/mreiche)\
**Post date:** [May 20, 2022, 6:34am UTC](https://discourse.aurelia.io/t/dom-createelement-is-not-a-function-when-importing-local-library/4774/1 "2022-05-20T06:34:34Z")

</div>

I’m using a local library like

```json
"dependencies": {
        "my-library": "file:../../my-library",
    },

```

Webpack and Typescript are compling just fine: `Compiled successfully.`  
but on runtime, I get the following error:

```auto
Inner Error:
Message: aurelia_pal __WEBPACK_IMPORTED_MODULE_1__.DOM.createElement is not a function
Inner Error Stack:
TypeError: aurelia_pal __WEBPACK_IMPORTED_MODULE_1__.DOM.createElement is not a function
    at createElement (webpack-internal:///D1o4:4783:63)

```

Is it possible to add `aurelia-pal` to the imported module as well?

---

<div class="post-metadata">

**Author:** ![Alexander-Taran](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/alexander-taran/32/2308_2.png) [@Alexander-Taran](https://discourse.aurelia.io/u/Alexander-Taran)\
**Post date:** [May 23, 2022, 7:36pm UTC](https://discourse.aurelia.io/t/dom-createelement-is-not-a-function-when-importing-local-library/4774/2 "2022-05-23T19:36:55Z")

</div>

So if you remove that dependency… Everything runs fine?

---

<div class="post-metadata">

**Author:** ![mreiche](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/mreiche/32/1912_2.png) [@mreiche](https://discourse.aurelia.io/u/mreiche)\
**Post date:** [May 24, 2022, 6:40am UTC](https://discourse.aurelia.io/t/dom-createelement-is-not-a-function-when-importing-local-library/4774/3 "2022-05-24T06:40:16Z")

</div>

Yes. It also runs fine, when I use the library from npm, not local filesystem.
