There are two separate issues here. First is the error message, second are the slow build times on the client.
For the first one, start with deleting the whole node_modules folder and do meteor npm install again.
For the second one, the reason may be mixing Vue and Blaze templates in the same project, as I assume hot module reload will only work for Vue templates. Are Blaze templates absolutely necessary for your project?
@gusto You’re right, two issues. I’d love to know how you’re getting HMR and fix the build times but of course first I need to get the project working again… I left in the Blaze templates just for the easy drop-in of the accounts package, if that’s the stopper for hot reloads I can remove it and make the login forms with Vue.
Regarding the error message, I’ve tried deleteing and installing node_modules… I’ve tried creating a completely new meteor project from scratch, reinstalling all npm/meteor packages and copying the needed files over… still same error, tried switching around file locations, my guess was the error had something to do with how .vue files are resolved, because for example module.resolve of account related files and others load up babel-runtime/helpers/*.js (many files in that location) with no problem…
I’m not 100% sure to be honest. Thinking of it, imho that would be a stopper, but I never mixed Vue with Blaze so I can’t guarantee it. Hot module reload works out of the box with new Vue+Meteor project. Whenever I save the changes in the client files, I instantly see the updates in the browser, even with a bigger project.
It works with just akryum:vue and akryum:vue-component. It also works with your configuration, with vue-meteor-tracker from npm instead of akryum:vue, I checked it.
Yes, I’m using Vuex and Vue-router from npm and it works without any issues.
It will be difficult to use Blaze and Vue in the same project. Specially if you use nested route or parameters on the route. It’s recommended to use vue-router, and this router will have issues with Blaze in this way.
I have a sister application that is all Blaze and uses Accounts. This new system will be only Meteor + VueJS. They’ll both use the same MongoDB. I’ll need to tie the VueJS system into the Accounts system, which will require custom calls to Accounts, and of course we’ll need to add custom forms for login.
In another VueJS thread there is a reference to using Accounts with VueJS I think (can’t find the link ATM). But we should collaborate on this effort to help one another and others that come behind us – we’re trail “blazing” here. Once I get to it, I’ll post a repo of what I’m working on in this area if there’s not already something out there.
Hi akryum, I’ve tried to start with a clean project to reproduce the initial error I was getting,
but now I fell even deeper into the erroRabbit hole… getting a strange issue with rendering
.vue components, where the style tags are exported instead of the template??
I created a simple gitrep, hopefully you can see the issue also:
I don’t get any <style> related error. I do get errors in App because of you using multiple root elements in the template and some router related error, but nothing about CSS.
What’s more, the CSS is working properly, the background has the color it should.
So weird, I updated the repo, not using router, just loading App.vue, still getting the same style tag bug, I tried reinstalling meteor, also didn’t help…
I see in your screenshot how your logs are coming out fine, I don’t understand what’s different about my environment… Are you also on windows?
@webkit, it seems you’re on the step BEFORE getting components working and building them – you’re just trying to set the project up right.
There’s another thread about getting your project set up here: Basics: Setting up a Meteor + VueJS project, it might help you to have the correct packages in your project to start.
The frustration is that I was already in the midst of developing and everything was working perfect (Meteor, Vue, Vuex, VueRouter) except for the build times… in the process of trying to fix it i encountered bugs i never seen, now i’m just trying to reproduce them…