Meteor!



  • @rstoenescu Is there a branch I can use to test the initial issue meanwhile? Thanks


  • Admin

    @mwarren2 Use “dev” branch.



  • @rstoenescu Sorry, I need some help with this, please.

    I can grab the dev branch of course, but there’s only the /src folder. I presumably need to end up with a /dist folder as well if it’s going to work.

    Not sure how to go about this… I can’t use quasar-cli, because I start off with a meteor/vue app. Can you help?


  • Admin

    Don’t really understand what you are trying to do, but you can also build Quasar with “npm run build” inside Quasar’s repo.



  • The meteor build has been failing all day with the same problem as this StackOverflow question. However there’s no answer there.

    TypeError: Cannot set property ‘/Users/malcolm/git/app-template-meteor/node_modules/quasar-framework/package.json’ of undefined

    I can see where it’s failing, but debugging a meteor build script is not my forte.
    Since the build fails, not even desktop is working this time.

    Don’t reckon it’s anything to do with you, so I’ll wait until the 0.9.0 release and try again.
    Sorry to take up your time like this.



  • @rstoenescu I’m simply doing a git clone and npm installing from the resulting folder

    git clone -b dev https://github.com/quasarframework/quasar.git
    meteor npm install —save …/…/quasar

    This appears to install quasar-framework 0.9.0 correctly, just like it did for 0.8.2

    But this time it’s no go.


  • Admin

    @mwarren2 I’ll try to make some time next week to investigate together. Is this ok for you?



  • @rstoenescu Thankyou, that’s great.

    Meanwhile I will try to find out what’s happening in the build script.



  • @rstoenescu Ok, I’ve found the problem, and it’s more or less as I thought.

    I’m missing a /dist folder which the script is looking for, in fact it’s specifically looking for dist/quasar.common.js. The /dist folder was there in 0.8.2, but it’s missing in my 0.9.0 installation, I just have a /src folder.

    This should be easy to fix, I guess. Is there anything wrong with the way I tried to install quasar this time?


  • Admin

    @mwarren2 hi. You’ve installed Quasar from github and no dist folder is stored there. Now that v0.9.1 is out you can install it from npm, which will have that folder. Cheers.



  • @rstoenescu Ok, got beyond the initial hurdle! Still got a white screen though.

    Now I’ve got
    TypeError: FastClick.attach is not a function. (In ‘FastClick.attach(document.body)’, ‘FastClick.attach’ is undefined)

    I’m looking into it



  • @mwarren2 Ok, here’s what I know - using Safari’s debugger for my IPhone:

    This is the code where the error occurs:

    if (Platform.has.touch) { // 6413
    FastClick.attach(document.body); // 6414
    }

    FastClick.attach at this point is undefined.
    Whereas the FastClick variable is actually pointing to FastClick.attach

    Reading the FastClick docs, you get FastClick or FastClick.attach depending on how you instantiate it, as I am sure you know.

    Does this give you any clue?
    Meteor is all es6 these days, if that’s any help.

    P.S. I see that you fixed the drawer problem, which is great.



  • @rstoenescu I guess Meteor is proving to be a bit complicated, right?


  • Admin

    @mwarren2 hi, can’t work on it at the moment. Busy with data table component. Sorry.



  • @rstoenescu Oh ok, no problem.



  • @rstoenescu For when you get a moment:

    I may have got somewhere with this problem. (Unfortunately however it’s revealed another one!)
    Meteor is presumably considered a common.js environment and it’s calling dist/quasar.common.js

    quasar.common.js is failing at line 6413 where we have this code:

    if (Platform.has.touch) {
        FastClick.attach(document.body);
    }
    

    From the FastClick docs:
    If you’re using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require(‘fastclick’). As a result, the easiest way to use FastClick with these loaders is as follows:

    var attachFastClick = require('fastclick');
    attachFastClick(document.body);
    

    So presumably, and just in the quasar.common.js code, we can do something similar:

    if (Platform.has.touch) {
        //FastClick.attach(document.body);
        var attachFastClick = FastClick;
        attachFastClick(document.body);
    }
    

    So far, so good.
    However unfortunately document.body is null here, just like in our first problem.


  • Admin

    Untested, but in order to ensure document.body is available, try this:

    var Utils = require('../utils)
    
    if (Platform.has.touch) {
       Utils.dom.ready(function () {
          var attachFastClick = FastClick;
          attachFastClick(document.body);
      })
    }
    


  • @rstoenescu It’s working… I have a result on an IPhone, which is great!
    There was no need for the require(‘utils’) line. A Utils variable was available.

    There were two places where a null document.body was causing errors and where I’ve added your code.

    Line 1220:

    function install$2(_Vue) {
       Utils.dom.ready(function () {
          var node = document.createElement('div');
          document.body.appendChild(node);
          toast = new _Vue(Toast$1).$mount(node);
      })
    }
    

    and Line 6413, which is the one we were talking about before

    if (Platform.has.touch) {
       Utils.dom.ready(function () {
          var attachFastClick = FastClick;
          attachFastClick(document.body);
      })
    }
    

  • Admin

    @mwarren2 ok, great. Will make a patch for Quasar tomorrow regarding this. Thanks for the feedback!



  • @rstoenescu Great thanks!

    Now that it’s working with Meteor, if there are other issues not actually regarding just Meteor (there’s one on IPhone in this app), would you prefer I open an issue, or carry on on this page?


Log in to reply