# Load supplementary plugins on demand

**URL:** <https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616>\
**Category:** General\
**Created:** [2 June 2021 20:14 UTC](https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616 "2021-06-02T20:14:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 June 2021 20:14 UTC](https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616/1 "2021-06-02T20:14:39Z")

</div>

I'm loading the [day.js module](https://day.js.org/docs/en/installation/installation) in the function node setup tab, and it works fine for basic date/time functions, however for more advanced functions, it requires additional plugins to be loaded as per the readme - [Loading plugin in NodeJS · Day.js](https://day.js.org/docs/en/plugin/loading-into-nodejs)

![plugin](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87a953643cc0cca405a2b3e3718d3b5c1ff8507e.jpeg)

The dayjs plugins have been installed by default when dayjs is added, and are at `/home/pi/.node-red/externalModules/node_modules/dayjs/plugin` but adding the plugin as per the screenshot above results in a node-RED crash.  
Can these supplementary modules also be added in the function node setup by adding the path somehow?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 June 2021 20:26 UTC](https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616/2 "2021-06-02T20:26:33Z")

</div>

No, I don't think the externalModules stuff will work with that. It isn't a scenario that has been considered.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [2 June 2021 20:49 UTC](https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616/3 "2021-06-02T20:49:48Z")

</div>

Ah well, I'll look for a different solution instead of dayjs.  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 August 2021 20:50 UTC](https://discourse.nodered.org/t/load-supplementary-plugins-on-demand/46616/4 "2021-08-01T20:50:47Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
