Quasar: Quasar upgrade to 1.12.12 -> 1.14.0 breaks app load

Created on 24 Sep 2020  路  4Comments  路  Source: quasarframework/quasar

Describe the bug
When running the app, the app compiles, however, on the browser, we get this error

Uncaught Error: Unknown import from Quasar: function Vue (options) {
  if ( true &&
    !(this instanceof Vue)
  ) {
    warn('Vue is a constructor and should be called with the `new` keyword');
  }
  this._init(options);
}

The method of the upgrade was manually changing the version number in package.json

To Reproduce
Steps to reproduce the behavior:

  1. Change the version number for quasar in package.json
  2. npm install (deleting the node_modules and reinstalling does not have any impact)
  3. Open the app URL in the browser
  4. Check the console log for error

Expected behavior
App should run fine

Screenshots
If applicable, add screenshots to help explain your problem.
image

Platform (please complete the following information):
OS: macOS Catalina 10.15.6
Node: v12.18.4
NPM: 6.14.8
Yarn: -
Browsers: Chrome
iOS: -
Android: -
Electron: -

bug need more info

All 4 comments

Hi,

I assure you there is something on your end. Maybe you've manually installed vue yourself (or any of its derivatives), ... there could be a lot of reasons, but we cannot help without a reproduction repo or https://codesandbox.quasar.dev

@mkhanal Yesterday I've updated our package.json as well (manually). The same error occurred, when I tried to upgrade babel-plugin-transform-imports to version 2.0.0. Switching back to 1.5.0 resolved it.

@rstoenescu I've followed a different path for the upgrade now. So it is all good.

I do think I owe an overview of what we are doing. And this is also my way of saying thanks to the quasar team.

We use quasar extensively. For our own products and our customers' as well. We've started creating templates that we can re-use which is more than just the basic setup. It has integrations with cloud providers, some opinionated builds (like lodash tree shaking), SAML and a few more.

We like to keep these templates up to date and so we keep updating all the dependencies, quasar and others. This failure happened in one of these cases. What I ended up doing (after comparing repos, and the files within them and unable to find the mess), we instantiated new project with vue and quasar and moved our setup to it. This has solved the problem for now, but I couldn't figure out the issue even after nuking the node installations, and the package installations.

We do use vue-cli instead of quasar-cli though.

We have been able to move forward. A big thanks to Quasar team again for all the effort you've put in. Our life has definitely become a lot simpler.

So we're dealing with the vue-cli plugin for Quasar, not Quasar CLI.
In this case, do NOT upgrade babel-plugin-transform-imports to any other version than its v1.

The vue-cli-plugin-quasar package has not been synched (yet) with the latest auto-import feature from Quasar CLI, where I managed to ditch babel-plugin-transform-imports.

For the best experience with Quasar, we do recommend using Quasar CLI.

Was this page helpful?
0 / 5 - 0 ratings