# How to integrate external npm package

**URL:** <https://community.postman.com/t/how-to-integrate-external-npm-package/22192>\
**Category:** Help Hub\
**Created:** [April 2, 2021, 6:25am UTC](https://community.postman.com/t/how-to-integrate-external-npm-package/22192 "2021-04-02T06:25:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![taehoshino](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/taehoshino/32/6608_2.png) [@taehoshino](https://community.postman.com/u/taehoshino)\
**Post date:** [April 7, 2021, 2:31am UTC](https://community.postman.com/t/how-to-integrate-external-npm-package/22192/3 "2021-04-07T02:31:22Z")

</div>

Hey @thefierycoder 👋

As I understand it, you want to convert collection file to OpenAPI spec file using this library, correct?

In general, you can download an external library using `pm.sendRequest` and evaluate it with `eval()` as shown in an example [here](https://community.postman.com/t/epoch-time-with-18-digits/19672).

But you cannot directly access local filesystem from scripts in Postman due to security reasons as mentioned [here](https://community.postman.com/t/is-it-possible-to-send-an-image-file-in-the-pre-request-script-of-a-request/4577/5), so it would be quite challenging to use that library from test scripts in Postman (the only workaround would be to set up a local server that access to your local file system and call the server from Postman).

Hopefully this clarifies a bit. Please do feel free to let me know if anything in my response needs further clarification 🙂

---

_[View the full topic](https://community.postman.com/t/how-to-integrate-external-npm-package/22192)._
