-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
TypeError: Cannot redefine property: $subReady #50
Comments
Maybe if you provide some hard details (ie., code) instead of just the error stack? |
I'm also seeing this problem when I try to import the Veutify library and call Relevant code in main.js for client: import './main.html';
import { Meteor } from 'meteor/meteor';
import Vue from 'vue';
import VueMeteorTracker from 'vue-meteor-tracker';
import Vuetify from 'vuetify';
import VueRouter from 'vue-router';
import App from '../imports/ui/App.vue';
import routes from '../imports/routes';
/* Plugins */
Vue.use(VueMeteorTracker);
Vue.use(VueRouter);
Vue.config.meteor.freeze = true;
Vue.use(Vuetify);
function createApp () {
const router = new VueRouter({
mode: 'history',
routes,
});
return {
app: new Vue({
el: '#app',
router,
...App,
}),
router,
};
}
Meteor.startup(() => createApp()); And here is my App.vue (I'm still using the vue example posted in the meteor docs:
Error output in client (but not shutting down server, code still works from what I can see):
|
@nrlewis, I think VueMeteorTracker does not have to be loaded as a plug-in... Can you try to remove:
and
|
HI @hluz , thank you for your response. I In the Vue-Meteor documentation, it explicitly loads a plugin: tried commenting out the lines above as you suggested, however, now I'm getting an undefined warning. Any ideas from the error below?
|
@nrlewis , you only need to add as a plugin if you didn't use the Meteor akryum:vue package . It is mentioned as a note in the instructions: |
Hi guys, just stumbled on this via google. Had same issue and it turns out that I had Vue twice. one in package.json "dependencies": {
"vue": "2.5.21",
} and second in
commented out
any more. Hope that helps |
@hluz and @tomasinouk, thank you for your responses... I did have the
{
"@babel/runtime": "^7.1.5",
"meteor-node-stubs": "^0.4.1",
"moment": "^2.23.0",
"vue-meteor-tracker": "^2.0.0-beta.5",
"vue-router": "^3.0.2",
"vuetify": "^1.4.0",
"vuex": "^3.0.1",
"vue": "^1.0.24"
}
import './main.html';
import { Meteor } from 'meteor/meteor';
import Vue from 'vue';
import VueMeteorTracker from 'vue-meteor-tracker';
import Vuetify from 'vuetify';
import App from '../imports/ui/App';
/* Plugins */
Vue.use(VueMeteorTracker);
Vue.use(Vuetify);
Meteor.startup(() => {
new Vue({
el: '#app',
...App,
});
});
console out:
I tried using only Thank you! |
I use... .meteor/packages
package.json
... without any issues. No need to import / load vue-meteor-tracker as a plugin. |
I had the same issue. My underlying issue was that I had my Vue.use('PluginName') inside the client folder so I moved it to the imports/ui/app.js where I have the createApp function This fixed the issue |
I am receiving the following TypeError: Cannot redefine property: $subReady
The error stack is:
at Function.defineProperty ()
at VueComponent.firstPrepare (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:43927)
at callHook (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:30503)
at VueComponent.Vue._init (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:32208)
at new VueComponent (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:32380)
at createComponentInstanceForVnode (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:31892)
at init (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:31713)
at createComponent (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:33190)
at createElm (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:33137)
at VueComponent.patch [as patch] (modules.js?hash=efa19dc1a6f0d0ead424b960075ceae573106eab:33673)
It seems like the package is trying to redefine an already existing Object.property while preparing the vue instance for rendering.
Any ideas how to prevent this error?
The text was updated successfully, but these errors were encountered: