quasarframework / quasar-template-meteor

Quasar Starter Kit for Meteor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not work when update to "quasar-framework": "^0.14.1"!

thearabbit opened this issue · comments

Get error

Uncaught SyntaxError: Unexpected token export
es5-shim.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at es5-shim.js:17
    at es5-shim.js:2792
promise.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at promise.js:17
    at promise.js:585
babel-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at babel-runtime.js:17
    at babel-runtime.js:163
ecmascript-runtime-client.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at ecmascript-runtime-client.js:17
    at ecmascript-runtime-client.js:110
random.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at random.js:18
    at random.js:371
mongo-id.js:19 Uncaught TypeError: Cannot read property 'Random' of undefined
    at mongo-id.js:19

Yes, I haven't tried updating to 0.14 yet, because it's a major update.
Hope to find time pretty soon

Waiting You!
👍 👍 👍

@rstoenescu In the other thread you said

Let me know if you need the commonjs format of Quasar.

In fact I was struggling with an "Uncaught SyntaxError: Unexpected token export" error, and I think your comment may be the solution for getting v0.14 to work with Meteor

@rstoenescu Any chance of getting meteor up-to-date with 0.14?
I realize you've got a lot on your plate... but us meteor guys are falling behind.

You were looking into creating the commonjs file in the distribution.

I couldn't get this working with the latest build of quasar either. So I installed it manually. Not ideal but it works until a fix is found for npm install quasar-framework method. Also this will add about 400+kb to your project doing it this way which is less than ideal.

This is what I did:
I created an imports/quasar directory in my client folder and installed quasar.esm.js and quasar.mat.css which I got from the dist directory of the quasar-edge version here
https://github.com/quasarframework/quasar-edge

Then in main.js I added:

import Quasar, * as Everything from '/client/imports/quasar/quasar.esm.js'; 
Vue.use(Quasar, { components: Everything, directives: Everything });

Then to my my root vue layout in my case AppLayout.vue I added this
require('/client/imports/quasar/quasar.mat.css'); in my script tag.

This works for now but hopefully meteor 1.6 will resolve its trouble with working with certain npm packages.

@mwarren2 Quasar UMD version is coming up. Thanks for your patience.

@rstoenescu Any news?
I know you've got too much to do, but I keep hoping if I remind you, you will find some time for Meteor.

However yesterday this comment appeared from one of Meteor's main developers about Meteor 1.6.1 that might eventually do for us here.
meteor/meteor-feature-requests#6 (comment)

@mwarren2 is there any way we can maybe expedite this process on our end. I have project I'm working on and I need to upgrade to the latest version of Quasar. I am more than happy to help on this.

You can do it manually like @delay did further up this issue. It works perfectly well if you can’t wait for a permanent solution.

@mwarren2 it seems like that has done the trick, I need to update all my component to v0.14 but that's not a problem. Thanks again for the quick reply. My offer for help still stands.

My understanding, from what I've read, is that Meteor does not process/build anything in the node_modules folder and that essential is by design. Is that the core issue to the problem we are facing?

No, that's not the case. Meteor at the moment doesn't process quasar-framework from npm unless there is a commonjs version in the /dist folder. @rstoenescu, who is inventor of quasar, hopes to provide this soon, but he's got a lot on his plate.
Obviously we just want a simple install from npm of quasar, so it's worth waiting for. However we are also hoping that meteor 1.6.1 might solve the problem. Meteor at the moment installs most stuff from npm, but not all. However I'm not entirely certain if the planned changes in Meteor 1.6.1 deal with our problem here or not - simply because it's a little over my head.

@thearabbit I have done a successful install of 0.14.7, and have updated the code.
But don't get too excited, because there is a ui issue!

@rstoenescu Quasar is installing now quite simply from npm into meteor, and the syntax errors have gone.

To get Quasar working with Meteor I have simply transpiled the es6 .js file to commonjs. Because Meteor still needs commonjs, though hopefully not for much longer.

But the ui is doing strange things, and I have not yet quite got it working properly.
I have gated the code that adds the two side drawers in AppLayout.vue and the Footer should be anchored at the bottom.

But I expect I shall have it all working soon.

@thearabbit I'm gradually getting the ui working again. I expect it will all be working soon

@thearabbit I think we can close this. The 0.14.7 version now works with Meteor.

I have to say that I find the new ui layout with the 'view' prop string hard to work with. I spent hours on this simple layout and it's still not working on desktop properly, only on mobile, and even then I find it a little unpredictable. It seemed so simple before.

Good new 💯

P.S. Did some final adjustments to the UI yesterday. It's working well now, even on desktop.

But now I base on Desktop.
haha

@thearabbit There was a bug in the ui, which has been solved in 0.14.8

It's now working properly.
The bug affected Meteor and dynamic imports.

Thanks, Now it is stable to try Quassar + Meteor?

Reasonably so.
But I wouldn't use it for your clients yet.

Quasar is still in beta, and so are the Akryum Meteor/Vue packages.
Quasar is close to a proper release, according to its author, but I expect to still see a few changes.

And if Meteor 1.6.2 allows us to use es6 code directly then the import syntax I have used will probably change a bit, but I don't see that as a big problem.

You will have to make up your own mind about it, but it's a good rule not to use betas for serious work.

Thanks for your reply.
I will try with a personal project, and be waiting for release.