Open ognjenio opened 4 years ago
In console:
Uncaught TypeError: Cannot read property 'mixin' of undefined
in calendar.umd.js:19034
external_commonjs_vue_commonjs2_vue_root_Vue_default.a.mixin({
I have the same issue using the component method and sourcing with requireJS.
Exception: Cannot read property 'mixin' of undefined
at Module.fb15 (.../calendar.umd.js:17653:56)
external_commonjs_vue_commonjs2_vue_root_Vue_default.a.mixin({
Have v-calendar@1.0.1
I have the same issue with 1.0.0-beta.23
Any responses to this?
I have same error. I want a reply to this.
Same error here... Can't really find a fix
any work-around?
I'm experiencing the same issue. Sorry, no work-around yet from my side.
What might be special about my situation however, is that I'm using typescript. So my setup looks roughly like this:
v-calendar.d.ts
declare module 'v-calendar';
somecomponent.vue
<template>...</template>
<script lang="ts">
import {Component, Prop, Vue} from "vue-property-decorator";
import VCalendar from 'v-calendar'
@Component({VCalendar})
export default class Somecomponent extends Vue {
I was wondering if the typescript scenario is applying to you guys, too? Because so far I thought more of a compiler related issue derived from me mixing TS/JS components.
By the way: For me this issue goes along with this front-end exception: https://github.com/nathanreyes/v-calendar/issues/518
:-) Just noticed that this issue is a duplicate of: https://github.com/nathanreyes/v-calendar/issues/505 ! There is a great hint from @neontuna: Downgrading to 1.0.0-beta.22 works for now.
So in my case, I needed to run:
yarn add v-calendar@1.0.0-beta.22
And modify my TS code slighlty:
import {Calendar} from "v-calendar";
@Component({components: { Calendar }})
<calendar></calendar>
This took me two days. Now it's working 🎉 Thanks!
I thought I was crazy, I tried upgrading to 1.0.6, but this bug is still present. Staying on 1.0.0-beta.22 for now.
Would anyone be able to try 1.0.7-beta.0
to see if this remedies the issue?
Just updated to 1.0.7-beta.0
.
Trying to follow the plugin installation method (2A) from the guide https://vcalendar.io/installation.html#npm gives me this error:
16:58:54 webpack.1 | "export 'default' (imported as 'VcCalendar') was not found in 'v-calendar'
16:58:54 webpack.1 | at HarmonyImportSpecifierDependency._getErrors (/rhome/bsluis/Projects/wps/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11)
16:58:54 webpack.1 | at HarmonyImportSpecifierDependency.getErrors (/rhome/bsluis/Projects/wps/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:68:16)
16:58:54 webpack.1 | at Compilation.reportDependencyErrorsAndWarnings (/rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compilation.js:1463:22)
16:58:54 webpack.1 | at /rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compilation.js:1258:10
16:58:54 webpack.1 | at AsyncSeriesHook.eval [as callAsync] (eval at create (/rhome/bsluis/Projects/wps/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
16:58:54 webpack.1 | at AsyncSeriesHook.lazyCompileHook (/rhome/bsluis/Projects/wps/node_modules/tapable/lib/Hook.js:154:20)
16:58:54 webpack.1 | at Compilation.finish (/rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compilation.js:1253:28)
16:58:54 webpack.1 | at /rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compiler.js:672:17
16:58:54 webpack.1 | at _done (eval at create (/rhome/bsluis/Projects/wps/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
16:58:54 webpack.1 | at eval (eval at create (/rhome/bsluis/Projects/wps/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:22)
16:58:54 webpack.1 | at /rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compilation.js:1185:12
16:58:54 webpack.1 | at /rhome/bsluis/Projects/wps/node_modules/webpack/lib/Compilation.js:1097:9
16:58:54 webpack.1 | at processTicksAndRejections (internal/process/task_queues.js:79:11)
16:58:54 webpack.1 | ℹ 「wdm」: Failed to compile.
How could this be possible ? This example from @nathanreyes is using the last version of the plugin (1.0.6) and that work well. The codesandbox example use NPM as package manager, but i use Yarn. Is it a problem only for Yarn ?
I am also using yarn! This could be a packaging issue indeed!
Just released 1.0.8. I had noticed there were some build issues in previous revisions so I'm wondering if it fixes some of these issues. Would love some feedback on it.
If it doesn't fix it, would also appreciate someone providing a test repo where I can properly duplicate and generate a test case to fix this issue once and for all.
Thanks for your continuous work, but unfortunatelly the issue has been there even with 1.0.8.
I guess the root cause is 59c5ca3d which introduces async/await functions, and related to regenerator-runtime
.
I prepared a test repo to reproduce the issue. I hope it helps you all, thanks.
Ok so maybe we are getting somewhere. async/await
was introduced for the first time in this beta. Babel isn't transforming this in any way given the current target environment
"browserslist": [
">1%",
"not ie 11",
"not op_mini all"
]
But that really doesn't explain why you could still use the plugin via
import VCalendar from 'v-calendar'
Vue.use(VCalendar)`
This bug as reported only seems to occur when you use the component method of installing. If it was an unsupported browser issue, then neither should work.
Btw I ran the test repo without issue, but that was probably b/c was running in Chrome which supports async
functions natively. Maybe I should just convert these functions to promises and be done with it. Still digging...
@nathanreyes This issue reappeared after i did npm install
a few days ago. it is funny as for a month it was working fine even with 1.0.0-beta.22
and now suddently "export 'default' (imported as 'DatePicker') was not found in 'v-calendar/lib/components/date-picker.umd'
Solutions used by myself
npm remove v-calender
npm i v-calendar@1.0.0-beta.22
and then, it work
I have the same issue no matter what method and version I use. I've tried v-calendar@1.0.0-beta.22 and 1.0.7-beta.0.
Version 1.0.0-beta.22
fixed this for me. Using yarn
in a Rails 6 project.
For anyone still having issues with this, if you are using Vue 3 then you need to use the 'next' branch of this project.
Getting the same error in 2.4.1
, was this ever fixed?
I'm using the 1.0.0-beta.22 version.
Just in case you have just installed the plugin. Please restart your application to reload the modules. This worked form me
<npm|npm|yarn> i -S v-calendar@next
Then restart your dev server
v1.0.1 and 1.0.0-beta.23
"export 'default' (imported as 'Calendar') was not found in 'v-calendar/lib/components/calendar.umd'
but the same is returned if I include VCalendar if I do plugins or components methods of installing.
Only code is:
import Calendar from 'v-calendar/lib/components/calendar.umd'
and
components: { Calendar },
What could possibly be the issue?