# Moment.js module included by function node gets deleted when importing is-date-object

**URL:** https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801
**Category:** General
**Tags:** function-node
**Created:** [30 October 2022 18:10 UTC](https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801 "2022-10-30T18:10:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maira](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@maira](https://discourse.nodered.org/u/maira)
#### Post date: [30 October 2022 18:10 UTC](https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801/1 "2022-10-30T18:10:44Z")

</div>

Hi all!

I have discovered a strange behaviour in Node Red. I got this error from function node

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e7315e60e51ae702623881565f4e05941b4dd60.png)

I am running several insatnces and i did not have this error in other instances. Upon looking into it I was able to reproduce the same issue when imported moment.js and then is-date-object.js. For some reason importing is-date-object.js removed moment.js.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bc263520b8a866c3a34504b5538f380888b1352c.png)

Installing this modules using npm install does not create any issue or conflict

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [30 October 2022 19:11 UTC](https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801/2 "2022-10-30T19:11:32Z")

</div>

Hi. Can you recover and repeat this at will?

If so, I would be great if you can raise an issue on the [node-red repository](https://github.com/node-red/node-red/issues) detailing the steps you take to achieve this problem.

---

<div class="post-metadata">

### Author: ![maira](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@maira](https://discourse.nodered.org/u/maira)
#### Post date: [31 October 2022 18:27 UTC](https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801/3 "2022-10-31T18:27:33Z")

</div>

Created it here [Moment.js module included by function node gets deleted when importing is-date-object · Issue #3937 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/3937)

---

<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: [30 December 2022 18:27 UTC](https://discourse.nodered.org/t/moment-js-module-included-by-function-node-gets-deleted-when-importing-is-date-object/69801/4 "2022-12-30T18:27:58Z")

</div>

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