Quasar: Installation with vue-cli 3: Cannot find module 'quasar' on serve

Created on 1 Aug 2018  Â·  9Comments  Â·  Source: quasarframework/quasar

Software version


Quasar: 0.17.0
OS: Win10
Node: 10.4.0
NPM: 6.1.0
Browsers: Chrome latest
iOS:
Android:
Any other software related to your bug:

JsFiddle (for Quasar v0.15+ only)

What did you get as the error?

ERROR in /dev/projects/me_and_poc/poc-vue-cli-3/ci-led-controller/src/main.ts
24:8 Cannot find module 'quasar'.
22 | QItemSide,
23 | QItemMain

24 | } from "quasar";
| ^
25 |
26 | Vue.use(Quasar, {
27 | i18n: lang,
Version: typescript 3.0.1
Time: 960ms

What were you expecting?

I expect the app to startup

What steps did you take, to get the error?

I'm using vue-cli 3 and vue ui to build the project
i create a new project in vue ui and then add the vue-plugin-quasar
then with the shell i go into the new app folder and do vue add quasar
i then answer to the interactive shell and i accept it to replace the main vue example
Then i start the server with npm run serve

I also tried to replace the import from quasar by an import from quasar-framework but it's not better.

Most helpful comment

The problem is with quasar not having typescript integration yet. It should work without problems with js.

All 9 comments

Why aren't you using Quasar's CLI?

Scott

Using quasar cli force you to accept its files architecture. With umd or
vue cli I can use my own one.

Le mer. 1 août 2018 à 14:02, Scott notifications@github.com a écrit :

Why aren't you using Quasar's CLI?

Scott

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/quasarframework/quasar/issues/2365#issuecomment-409551077,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJWW6-sJGM_rpQjQYsrKWhI78ESsaE1ks5uMZjfgaJpZM4VqNxK
.

Ah. Ok.

I just went through the steps myself using Vue CLI 3 and the quasar plug-in and it worked perfectly.

Maybe a stupid question, but are you sure you have Vue CLI version 3? vue -V?

Scott

The problem is with quasar not having typescript integration yet. It should work without problems with js.

i think the problem was with vue ui. I removed the folder and setup a new project (without Typescript this time) and everything worked well.
I didn't retry with TS, maybe i will but not for instance.
Thx

I just confirmed the problem still exists with a new clean build (using vue-cli 3 + typescript, quasar 0.17.17).
Has the issue been resolved but not committed/merged yet?

@andrei7777 There is no official support for typescript yet.

@pdanpdan are there any documented workarounds, or can we say for the moment that any projects using TS cannot use quasar framework?

Adding an sfc.d.ts with declare module "quasar" as in https://medium.com/@chimon1984/adding-typescript-support-to-quasar-eeec7e10a833 worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fnicollier picture fnicollier  Â·  3Comments

jigarzon picture jigarzon  Â·  3Comments

sskwrl picture sskwrl  Â·  3Comments

jean-moldovan picture jean-moldovan  Â·  3Comments

xereda picture xereda  Â·  3Comments