# Using Third-Party Library in Modules

**URL:** <https://community.hubspot.com/t/using-third-party-library-in-modules/65796>\
**Category:** CMS Development\
**Created:** [September 23, 2022, 6:55pm UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796 "2022-09-23T18:55:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![antp\_dev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/antp_dev/32/74772_2.png) [@antp\_dev](https://community.hubspot.com/u/antp_dev)\
**Post date:** [September 23, 2022, 6:55pm UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796/1 "2022-09-23T18:55:18Z")

</div>

Hi there 👋,

I’m customizing an existing module that is pulling in blog posts and filtering posts by tags. I’m aiming to use the [mixitup](https://www.kunkalabs.com/mixitup/docs/get-started/) library to provide better filtering animations and functionality. After I read the documentation I’m uncertain how to get the library inside the HubSpot environment.

I used npm to install the components locally and I see the node\_modules folder but not sure if those get pushed up into the HubSpot environment.

If anyone has a solution or can point me in the right direction, that’d be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 26, 2022, 3:33am UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796/2 "2022-09-26T03:33:05Z")

</div>

Hey [@](https://community.hubspot.com/t5/user/viewprofilepage/user-id/379041)[antp\_dev](https://community.hubspot.com/t5/user/viewprofilepage/user-id/297419)

Please refer this doc to upload your content from local to hubspot environment

[https://docs.google.com/document/d/1XNHBU3EW7kdv26Qyt-n\_f3lFPT8PlLIpvoQc5gcqFpk/edit](https://docs.google.com/document/d/1XNHBU3EW7kdv26Qyt-n_f3lFPT8PlLIpvoQc5gcqFpk/edit)

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![antp\_dev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/antp_dev/32/74772_2.png) [@antp\_dev](https://community.hubspot.com/u/antp_dev)\
**Post date:** [September 26, 2022, 2:13pm UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796/3 "2022-09-26T14:13:48Z")

</div>

So do I **need** to initialize a new theme? I created a child theme and I am trying to add functionality to the child module.

When I try to run _hs upload \<local\_src\> \<hubspot\_src\>_ I get a success message within the CLI but no node\_module folder is actually being pushed to the environment.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [September 27, 2022, 11:02am UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796/4 "2022-09-27T11:02:15Z")

</div>

Hi [@antp\_dev](https://community.hubspot.com/t5/user/viewprofilepage/user-id/297419),

to be clear: **you don’t need a new theme.**

Adding mixitup(or any other 3rd-party framework) is quite easy as long as you have full theme access(which you have by creating a child-theme).

You can:

- add a \<script\>-link to your base.html
- add a new JS file to your theme and copy/paste the whole script into it and add this script/file to your base.html or module
- upload the JS file to the file-manager and link it in base.html or module

If you want to create a custom blog listing with mixitup I’d recommend to create a custom module(it might be easier). It could look something like this:

```lia-code-sample
{# start script import #}
{% require_js %}
<script src="/path/to/mixitup.min.js"></script>
<script>
{# place your mixitup config here #}
</script>
{% end_require_js %}
{# end script import #}

{# start module #}
{% set rec_posts = blog_recent_posts("default", 9999) %}
<div class="container">
{% for rec_post in rec_posts %}
 <div class="mix">
 <div class="post-title">{{ rec_post.name }}</div>
 </div>
{% endfor %}
</div>
{# end module #}

```

Also: take a look at the [possible functions](https://developers.hubspot.com/docs/cms/hubl/functions) in the docs. I used [blog\_recent\_posts](https://developers.hubspot.com/docs/cms/hubl/functions#blog-recent-posts) in this example.

best,

Anton

---

<div class="post-metadata">

**Author:** ![antp\_dev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/antp_dev/32/74772_2.png) [@antp\_dev](https://community.hubspot.com/u/antp_dev)\
**Post date:** [September 27, 2022, 7:35pm UTC](https://community.hubspot.com/t/using-third-party-library-in-modules/65796/5 "2022-09-27T19:35:17Z")

</div>

Hi @Anton,

I found out that since the package was within a _node\_modules_ folder that all files/folders were being ignored. I took them out of the _node\_modules_ folder and was able to successfully upload them to the Design Manager.

I will continue to work on it based on your original suggestion.

Thank you!
