Describe the bug
Upgraded Quasar from 1.9.13 to 1.12.5. Quasar compiles, but once the app runs in the browser it immediately throws this cryptic error:
vue.runtime.esm.js?5593:5106 Uncaught TypeError: Cannot read property 'install' of undefined
at Function.Vue.use (vue.runtime.esm.js?5593:5106)
at eval (import-quasar.js?76de:24)
at Object../.quasar/import-quasar.js (app.js:962)
at __webpack_require__ (app.js:849)
at fn (app.js:151)
at eval (app.js?cb94:18)
at Object../.quasar/app.js (app.js:938)
at __webpack_require__ (app.js:849)
at fn (app.js:151)
at eval (client-entry.js?e881:21)
In import-quasar.js this seems to throw the error:
_vue.default.use(_quasar.Quasar, {
config: {},
lang: _enUs.default,
iconSet: _materialIcons.default
});
And then Vue (vue.runtime.esm.js) throws this error:
function initUse (Vue) {
Vue.use = function (plugin) {
var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
if (installedPlugins.indexOf(plugin) > -1) {
return this
}
// additional parameters
var args = toArray(arguments, 1);
args.unshift(this);
->> if (typeof plugin.install === 'function') {
plugin.install.apply(plugin, args);
} else if (typeof plugin === 'function') {
plugin.apply(null, args);
}
installedPlugins.push(plugin);
return this
};
}
Node: v10.18.1, but tried different versions - no change
Browsers: all browsers
Any hints what could be going on?
It must be a problem with yarn/npm. So delete your node_modules and yarn.lock/package-lock.json then yarn/npm install again.
No it's not a problem with yarn/npm, I've tried that. The new build system is the cause.
@quasar/app v1.8.10 works fine
From @quasar/app v1.9.0 it throws this error
It's something on your end. Guaranteed.
Do a "quasar info" and copy/paste the output pls.
Btw, latest "@quasar/app" is v1.9.6, and "quasar" v1.12.5. Also, what's your quasar.conf.js content?
Yes I know it's on our side. I figured it out:
.babelrc
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
}
}
]
],
Apparently Quasar doesn't like that anymore
But that's since "@quasar/app" v1.0.0... Use this instead (babel.config.js):
module.exports = {
presets: [
'@quasar/babel-preset-app'
]
}
yep, we've been using Quasar from the start 馃槃 and apparently missed the instructions to upgrade that settings. You're moving fast 馃殌
Thanks for your help!
Glad everything's working for you now.
Also, please make that you remove the workboxOptions > exclude above when you upgrade to q/app v2.
I cannot for the life of me get this to work:
```module.exports = {
presets: [
'@quasar/babel-preset-app'
],
plugins: [
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-transform-modules-commonjs"
]
}
// It works fine in all browsers if I remove the plugins, however I need these plugins for IE11 Support.