# Developing custom module using shufflejs with error

**URL:** <https://community.hubspot.com/t/developing-custom-module-using-shufflejs-with-error/77876>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [March 23, 2023, 7:17pm UTC](https://community.hubspot.com/t/developing-custom-module-using-shufflejs-with-error/77876 "2023-03-23T19:17:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkruger](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tkruger/32/18238_2.png) [@tkruger](https://community.hubspot.com/u/tkruger)\
**Post date:** [March 23, 2023, 7:17pm UTC](https://community.hubspot.com/t/developing-custom-module-using-shufflejs-with-error/77876/1 "2023-03-23T19:17:29Z")

</div>

Hi All!

I am working with shufflejs ([https://vestride.github.io/Shuffle/](https://vestride.github.io/Shuffle/)) on codepen, and it works fine however when I put it in a HubSpot module I get the following error.

Codepen: [https://codepen.io/tkruger/pen/dyqKYBz](https://codepen.io/tkruger/pen/dyqKYBz)

Error in HubSpot module:

![tkruger_0-1679598418348.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/d/3db25f0b1d6196728394ce78f3d8b342700c4947.png)

Spoiler

module\_107677899044\_filtering-content.min.js:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘shouldStopExecution’)  
at shufflejs.\_removeActiveClassFromChildren (module\_107677899044\_filtering-content.min.js:1:1422)  
at shufflejs.\_handleFilterClick (module\_107677899044\_filtering-content.min.js:1:1103)

I downloaded shuffle.min.js file and included in with the module under linked files.

[https://cdnjs.cloudflare.com/ajax/libs/Shuffle/6.1.0/shuffle.min.js](https://cdnjs.cloudflare.com/ajax/libs/Shuffle/6.1.0/shuffle.min.js)

Please any advice, thank you

---

<div class="post-metadata">

**Author:** ![tkruger](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tkruger/32/18238_2.png) [@tkruger](https://community.hubspot.com/u/tkruger)\
**Post date:** [March 24, 2023, 2:04pm UTC](https://community.hubspot.com/t/developing-custom-module-using-shufflejs-with-error/77876/2 "2023-03-24T14:04:02Z")

</div>

I switched to using filterizr instead of shufflejs and it works fine with HubSpot. [Tree Pruning in Palm Bay FL | Palm Bay Florida Tree Service & Arborist](https://yiotis.net/filterizr/#/)

I would like to know why the error happen though in case I run into this again using js libraries with HubSpot.
