# NPM Libraries in Hooks

**URL:** <https://community.auth0.com/t/npm-libraries-in-hooks/43087>\
**Category:** Get Help\
**Tags:** hooks\
**Created:** [May 15, 2020, 11:38am UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087 "2020-05-15T11:38:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![calqulate](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/calqulate/32/19295_2.png) [@calqulate](https://community.auth0.com/u/calqulate)\
**Post date:** [May 15, 2020, 11:38am UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/1 "2020-05-15T11:38:18Z")

</div>

Hello,

Are repository issues [here](https://github.com/auth0-extensions/canirequire/issues) monitored at all? We’re submitting requests since quite some time but they’re never really being responded to.

On another note, is it possible to import/include a library dynamically inside a hook; so really downloading it on the fly?

Thank you!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 15, 2020, 11:43am UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/2 "2020-05-15T11:43:48Z")

</div>

Hey there @calqulate!

Reaching out to the responsible team to find out more about it. Will get back to you soon!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 15, 2020, 11:47am UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/4 "2020-05-15T11:47:18Z")

</div>

In terms of adding NPM modules to Hooks, here’s the thread you may find useful:

> [@How to add NPM packages to a Hook?](http://community.auth0.com/t/how-to-add-npm-packages-to-a-hook/8255):
>
> I am attempting to create a post-user-registration Hook that will update a user record in MailChimp. The MailChimp API requires the MD5 hash of the user email address as a resource identifier, so I need to be able to import the Node md5 package in my Hook source file. Unfortunately the md5 package is apparently unavailable in the default environment that Auth0 provides for Hooks. Two questions: Is there a way for me to include additional Node packages in my Hook (similar to what Amazon Lambda…

---

<div class="post-metadata">

**Author:** ![calqulate](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/calqulate/32/19295_2.png) [@calqulate](https://community.auth0.com/u/calqulate)\
**Post date:** [May 15, 2020, 12:08pm UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/5 "2020-05-15T12:08:01Z")

</div>

I see, thank you @konrad.sopala – I guess the reason why it doesn’t work sometimes is that I use continuous integration to deploy using `a0deploy` and my `tenant.yml` file. Is there any way to use `a0deploy` to provision npm modules to my tenant beforehand so deployment would not fail?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 19, 2020, 9:57am UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/6 "2020-05-19T09:57:33Z")

</div>

I’ve got a response from the team that they missed a bit with keeping up with the issues and PRs submitted BUT they’re preparing a release this week that will include all of those outstanding package request issues so stay tuned!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 25, 2020, 4:00pm UTC](https://community.auth0.com/t/npm-libraries-in-hooks/43087/7 "2020-05-25T16:00:04Z")

</div>

This topic was automatically closed after 6 days. New replies are no longer allowed.
