Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Meteor 1.8.2-beta.4 #364

Open
JanMP opened this issue May 25, 2019 · 12 comments
Open

Error on Meteor 1.8.2-beta.4 #364

JanMP opened this issue May 25, 2019 · 12 comments

Comments

@JanMP
Copy link

JanMP commented May 25, 2019

In an App that works fine with Meteor 1.8.1 I get this error after updating to 1.8.2-beta.4:

AppLayout.vue:42 Uncaught TypeError: _Vue.component is not a function
    at AppLayout.vue (AppLayout.vue:42)
    at fileEvaluate (modules-runtime.js?hash=0ba1f02e48d68e39631c5674a06607fabab6101e:346)
    at Module.require (modules-runtime.js?hash=0ba1f02e48d68e39631c5674a06607fabab6101e:248)
    at require (modules-runtime.js?hash=0ba1f02e48d68e39631c5674a06607fabab6101e:268)
    at app.js?hash=c5fbae48585dabd4ac1bf87ce2c7582e0b33250f:1298
@JanMP
Copy link
Author

JanMP commented May 25, 2019

also see meteor/meteor#10522

@benjamn
Copy link

benjamn commented May 25, 2019

Any chance you could put together a small runnable Vue+Meteor app that reproduces the problem? If it's hard to reproduce outside of your app, I understand, but hopefully the problem will be obvious and the reproduction will be easy. Thanks in advance!

@JanMP
Copy link
Author

JanMP commented May 25, 2019

Except for the addition of the pug, coffeescript and sass packages this is a minimum setup for a meteor-vue app with just one component: https://github.com/JanMP/meteor-vue-setup

@JanMP
Copy link
Author

JanMP commented Jun 19, 2019

@benjamn Is that repo helpful?

@jbl2024
Copy link
Contributor

jbl2024 commented Oct 31, 2019

Hi,
i'm stuck with the same issue on my app with 1.8.2-rc.4
Btw this issue is reproducible also on this sample project: https://github.com/meteor-vue/todomvc.git

@jbl2024
Copy link
Contributor

jbl2024 commented Nov 16, 2019

Same error on 1.8.2.
After digging into source code, i found that

var _Vue = require('vue')

should be

var _Vue = require('vue').default

I don't know why this change is needed for 1.8.2.
Anyway you can test it by copying the vue-component folder into local packages directory of your app.

Hope it helps.

@welkinwong
Copy link

same

@filipenevola
Copy link

@jbl2024 can you make a PR changing this line?

@Akryum any comment? Thanks

@thor-n
Copy link

thor-n commented Dec 9, 2019

I have the same problem, howto use the code fix on my meteor/vue project?

@jbl2024
Copy link
Contributor

jbl2024 commented Dec 9, 2019

imho you have 2 options:

  • first option: do not rely on auto registration

Move your components in imports folder (https://github.com/meteor-vue/vue-meteor/tree/master/packages/vue-component#automatic-components-registration) and auto import them yourself (https://vuejs.org/v2/guide/components-registration.html#Automatic-Global-Registration-of-Base-Components)

  • second option: clone my temp fix in your ./packages directory
git clone --branch [email protected] https://github.com/jbl2024/vue-meteor
cp -r vue-meteor/packages/vue-component YOUR_METEOR_PROJECT/packages/

@thor-n
Copy link

thor-n commented Dec 20, 2019

@jbl2024 thanks -i will look at it.

@pbrilius
Copy link

Still saving this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants