You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using moment.locale() or moment.updateLocale() causes an error, "TypeError: this.$moment.locale is not a function" or "TypeError: this.$moment.updateLocale is not a function"
vue.runtime.esm.js?5593:1888 TypeError: this.$moment.locale is not a function
at VueComponent.created (App.vue?234e:15)
at invokeWithErrorHandling (vue.runtime.esm.js?5593:1854)
at callHook (vue.runtime.esm.js?5593:4219)
at VueComponent.Vue._init (vue.runtime.esm.js?5593:5008)
at new VueComponent (vue.runtime.esm.js?5593:5154)
at createComponentInstanceForVnode (vue.runtime.esm.js?5593:3283)
at init (vue.runtime.esm.js?5593:3114)
at createComponent (vue.runtime.esm.js?5593:5978)
at createElm (vue.runtime.esm.js?5593:5925)
at Vue.patch [as __patch__] (vue.runtime.esm.js?5593:6516)
Expected behavior
Expecting the locale of my moment object to be set.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows 10
Electron
Version 2004
Moment-specific environment
The time zone setting of the machine the code is running on: UTC-06:00
The time and date at which the code was run: 3/11/2021, 11:20 AM
Other libraries in use (TypeScript, Immutable.js, etc)
App.vue?234e:11 Thu Mar 11 2021 11:28:57 GMT-0600 (Central Standard Time)
App.vue?234e:12 3/11/2021, 11:28:57 AM
App.vue?234e:13 360
App.vue?234e:14 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.122 Electron/9.4.4 Safari/537.36
App.vue?234e:15 2.4.0
Additional context
Add any other context about the problem here.
Quasar is setup to have moment as a global accessible as this.$moment. This is done in the quasar.conf.js in the boot area corresponds to the file at src/boot/moment.js.
Even without this global setup, I am still getting this:
vue.runtime.esm.js?5593:1888 TypeError: moment__WEBPACK_IMPORTED_MODULE_0___default.a.locale is not a function
at VueComponent.created (App.vue?234e:19)
at invokeWithErrorHandling (vue.runtime.esm.js?5593:1854)
at callHook (vue.runtime.esm.js?5593:4219)
at VueComponent.Vue._init (vue.runtime.esm.js?5593:5008)
at new VueComponent (vue.runtime.esm.js?5593:5154)
at createComponentInstanceForVnode (vue.runtime.esm.js?5593:3283)
at init (vue.runtime.esm.js?5593:3114)
at createComponent (vue.runtime.esm.js?5593:5978)
at createElm (vue.runtime.esm.js?5593:5925)
at Vue.patch [as __patch__] (vue.runtime.esm.js?5593:6516)
Describe the bug
Using moment.locale() or moment.updateLocale() causes an error, "TypeError: this.$moment.locale is not a function" or "TypeError: this.$moment.updateLocale is not a function"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expecting the locale of my moment object to be set.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Moment-specific environment
Please run the following code in your environment and include the output:
please see below:
Additional context
Add any other context about the problem here.
Quasar is setup to have moment as a global accessible as this.$moment. This is done in the quasar.conf.js in the boot area corresponds to the file at src/boot/moment.js.
Even without this global setup, I am still getting this:
with these changes in App.vue:
The text was updated successfully, but these errors were encountered: