After 0.14.1 Update: "Unkown custom element" errors for q-elements?



  • Hello there,

    I’ve set up a new quasar install recently and just updated to 0.14.1 yesterday. Now when run dev I realize that apparently no q-element can be found. The Index.vue (which is basically still the out-of-the-box file) returns errors for every q-element, starting with

    [Vue warn]: Unknown custom element: <q-layout> - did you register the component correctly? For recursive components, make sure to provide the “name” option.

    The main.js is untouched. Does anyone have an idea what I did wrong, as this obviously has to do with my installation? My package.json reads

    “dependencies”: {
    “axios”: “^0.16.2”,
    “babel-runtime”: “^6.0.0”,
    “fastclick”: “^1.0.6”,
    “material-design-icons”: “^3.0.1”,
    “moment”: “^2.15.0”,
    “node-sass”: “^4.5.3”,
    “quasar-extras”: “0.0.7”,
    “quasar-framework”: “^0.14.1”,
    “roboto-fontface”: “^0.7.0”,
    “sass-loader”: “^6.0.6”,
    “vue”: “^2.3.0”,
    “vue-router”: “^2.0.0”
    },

    and “npm ls” returns
    quasar-extras@0.0.7
    quasar-framework@0.14.1

    Thank you very much in advance for your help!

    A Quasar Newbie



  • Please read up on it here: http://quasar-framework.org/components/introduction-for-beginners.html#Using-Quasar-Components

    tl;dr In Quasar v0.14 you have to explicitly import each component to minimize the resulting bundle size by not including unneeded components. You can do that in you main.js



  • Thank you @a47ae , sorry I did not notice that tree shaking is the default now… So I did not question my import statement. The errors are gone when importing all components for testing.



  • No problem, a lot of things changed in 0.14 so it is sometimes hard to keep up with all the changes. :D
    Glad to hear that your errors could be resolved :)


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.