Quasar: Cannot find module 'quasar-framework'.

Created on 11 Mar 2018  路  5Comments  路  Source: quasarframework/quasar

I am trying to integrating "quasar-framework": "^0.15.6" to my existing application but it didn't work, it always give me error Cannot find module 'quasar-framework',

Most helpful comment

It would be great if there were a possibility to use Quasar without the starter kit.

Something like this:

import Vue from 'vue';
import Quasar from 'quasar-framework';
Vue.use(Quasar, {
  theme: 'ios',
});

This would make the migration of existing projects to Quasar much easier.

All 5 comments

+1

Please fill in more details. How are you using Quasar? What's your project like? Any repo I can take a look?

I have taken the following steps.

  1. created dotnet application from builtin templates using command dotnet new vue
  2. then add "quasar-framework": "^0.15.6" in package.json
  3. then npm i
  4. add import Quasar from 'quasar-framework';
  5. then bundle configuration file using webpack webpack --config webpack.config.vendor.js;
  6. then bundle application file using webpack webpack
    It gives error Cannot find module 'quasar-framework'

So you're not using the Quasar's starter kit. What you need to know is that quasar-framework package has no "main" field in its package.json, because there are 2 themes. Depending on what theme you want to use, your imports need to look like:

// using Material theme
import Quasar from 'quasar-framework/dist/quasar.mat.esm.js

// using iOS theme
import Quasar from 'quasar-framework/dist/quasar.ios.esm.js

Or you can add a webpack alias to your setup to point to those files. You also need to import Quasar's CSS, based on theme.

But I highly recommend you use Quasar's official starter kit.

It would be great if there were a possibility to use Quasar without the starter kit.

Something like this:

import Vue from 'vue';
import Quasar from 'quasar-framework';
Vue.use(Quasar, {
  theme: 'ios',
});

This would make the migration of existing projects to Quasar much easier.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wc-matteo picture wc-matteo  路  3Comments

victorborgaco picture victorborgaco  路  3Comments

fnicollier picture fnicollier  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments

slowaways picture slowaways  路  3Comments