quasar: Reopening #5987 - quasar build -m pwa failing

Reopening #5987

ERROR in chunk app [entry]
Cannot convert undefined or null to object

ERROR in chunk app [entry]
({
chunk: chunkData
}) => this.options.moduleFilename(chunkData)
Path variable [contenthash:8] not implemented in this context: css/[name].[contenthash:8].css

app:build [FAIL] Build failed with errors. Check log above. +1ms

Still happens with “@quasar/app” v1.5.0.

It must be something causing the bug in the code, because creating a new project from quasar scaffolding and copying package.json, package-lock.json and quasar.conf.js, then executing npm ci and quasar build -m pwa it builds normally on the new project, but not on the upgraded project with the rest of the code.

I can share the project for reproduction if I manage to isolate the piece of the code causing this, or sharing the whole repo privately with @rstoenescu

The issue does not happen if I downgrade @quasar/app to v1.3.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@gorango I opened an Issue https://github.com/quasarframework/quasar/issues/6188 to request the possiblity to opt out processing of the webserver. It is causing all kinds of trouble for me.

I noticed also since the update to @quasar/app@1.5.0 my build mode of quasar build -m ssr (with pwa set to true) does not show that the build mode is ssr + pwa:

Screen Shot 2020-01-14 at 14 18 47

OK, now I am confident that the culprit is a different method of importing components in vue router.

OLD way which breaks build:

import MyPage from '../pages/Page'

const routes = [{
    component: MyPage,

NEW way in newer versions of Quasar

const routes = [{
    component: () => import('pages/Page.vue'),

Build now succeeds with warnings:

WARNING in chunk chunk-common [mini-css-extract-plugin]
Conflicting order. Following module has been added:
 * css ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-2-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-2-2!./node_modules/@quasar/app/node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-2-3!./node_modules
/@quasar/app/lib/webpack/loader.quasar-scss-variables.js!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/gnirts-loader/lib/gnirts-loader.js!./src/layouts/Layout.vue?vue&type=s
tyle&index=0&id=e90bbc20&lang=scss&scoped=true&
despite it was not able to fulfill desired ordering with these modules:
 * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-2-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--5-oneOf-2-2!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib
??vue-loader-options!./node_modules/gnirts-loader/lib/gnirts-loader.js!./src/components/Info.vue?vue&type=style&index=0&id=446de752&scoped=true&lang=css&
   - couldn't fulfill desired order of chunk group(s)

WARNING in chunk chunk-common [mini-css-extract-plugin]
Conflicting order. Following module has been added:
 * css ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-2-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--7-oneOf-2-2!./node_modules/@quasar/app/node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-2-3!./node_modules
/@quasar/app/lib/webpack/loader.quasar-scss-variables.js!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/gnirts-loader/lib/gnirts-loader.js!./src/components/Controls.vue?vue&type=st
yle&index=0&id=db39e70e&lang=scss&scoped=true&
despite it was not able to fulfill desired ordering with these modules:
 * css ./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-2-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--5-oneOf-2-2!./node_modules/@quasar/app/lib/webpack/loader.auto-import.js?kebab!./node_modules/vue-loader/lib
??vue-loader-options!./node_modules/gnirts-loader/lib/gnirts-loader.js!./src/components/Info.vue?vue&type=style&index=0&id=446de752&scoped=true&lang=css&
   - couldn't fulfill desired order of chunk group(s)
   - while fulfilling desired order of chunk group(s) , ,

@tjaoc I’ve already suggested a solution / workaround in my second post. Change your imports in vue router.