# Cannot activate/import #moment into #uibuilder

**URL:** https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844
**Category:** Dashboard
**Tags:** uibuilder
**Created:** [17 February 2020 12:15 UTC](https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844 "2020-02-17T12:15:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![stanleyseow](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stanleyseow/32/7046_2.png) [@stanleyseow](https://discourse.nodered.org/u/stanleyseow)
#### Post date: [17 February 2020 12:15 UTC](https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844/1 "2020-02-17T12:15:31Z")

</div>

I could not use $moment functions even tho I loaded vue-moment.js with :

`<script src="../uibuilder/vendor/vue-moment/dist/vue-moment.js"></script>`

and activated the plugins in index.js with :-  
_Vue.use('vue-moment');_

Any help is appreciated ...

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [17 February 2020 13:02 UTC](https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844/2 "2020-02-17T13:02:53Z")

</div>

When loading random VueJS components or extensions, I generally look for the instructions that relate to using it from a CDN. Doing an npm install (e.g. installing from uibuilder) is quite similar.

The following gives some clues in this case:

> **[Using Moment with Vue.js from CDN link](https://forum.vuejs.org/t/using-moment-with-vue-js-from-cdn-link/36243/5)**
>
> I went to moments library - all they had was npm. I went to google CDN for moment and I keep getting the ‘moment’ isn’t recognized…

Looks like you also have to load moment separately. Also, you wouldn't normally need to do a `Vue.use` when loading from a script tag.

In addition, you may not need vue-moment at all. Unless you wan to use moment as a Vue filter, why not just use the moment library directly in your own code?

Either way, don't forget to check your browser's development console (F12 normally) for errors.

---

<div class="post-metadata">

### Author: ![stanleyseow](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stanleyseow/32/7046_2.png) [@stanleyseow](https://discourse.nodered.org/u/stanleyseow)
#### Post date: [20 February 2020 06:15 UTC](https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844/3 "2020-02-20T06:15:58Z")

</div>

Ok thanks, loaded vanila moment.js with script tag and got it working ....

---

<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: [5 March 2020 06:16 UTC](https://discourse.nodered.org/t/cannot-activate-import-moment-into-uibuilder/21844/4 "2020-03-05T06:16:03Z")

</div>

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