# Importing from a module that requires a catch and window attachment

**URL:** <https://talk.observablehq.com/t/importing-from-a-module-that-requires-a-catch-and-window-attachment/8263>\
**Category:** Help\
**Created:** [September 8, 2023, 7:57pm UTC](https://talk.observablehq.com/t/importing-from-a-module-that-requires-a-catch-and-window-attachment/8263 "2023-09-08T19:57:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addem](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@addem](https://talk.observablehq.com/u/addem)\
**Post date:** [September 8, 2023, 7:57pm UTC](https://talk.observablehq.com/t/importing-from-a-module-that-requires-a-catch-and-window-attachment/8263/1 "2023-09-08T19:57:58Z")

</div>

I am trying to load the NPM package `babylon-helper-lib`. I entered into the module helper on the website and it gave this:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/9/9966d2480a6c5292af52dead6dbebf3d56f2b152.png)

I tried then writing a cell with

```auto
LIB = require('babylon-helper-lib@0.0.16/dist/index.js').catch(() => window["__defProp"])
window.__defProp;

```

And I tried about 50 other guesses about how to use this, but none of them worked. I’d appreciate any guidance, thanks!

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [September 8, 2023, 9:29pm UTC](https://talk.observablehq.com/t/importing-from-a-module-that-requires-a-catch-and-window-attachment/8263/2 "2023-09-08T21:29:58Z")

</div>

The library bundle does not appear to support UMD modules (which is what Observable’s require() is for). However, you can import it as ES module with

```auto
helpers = import("https://esm.sh/babylon-helper-lib@0.0.16")

```

---

<div class="post-metadata">

**Author:** ![addem](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@addem](https://talk.observablehq.com/u/addem)\
**Post date:** [September 8, 2023, 9:43pm UTC](https://talk.observablehq.com/t/importing-from-a-module-that-requires-a-catch-and-window-attachment/8263/3 "2023-09-08T21:43:31Z")

</div>

That worked! Thank you! 🙂
