Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quasar build bug? #17319

Closed
MandingaRadi opened this issue Jun 24, 2024 · 4 comments
Closed

Quasar build bug? #17319

MandingaRadi opened this issue Jun 24, 2024 · 4 comments

Comments

@MandingaRadi
Copy link

MandingaRadi commented Jun 24, 2024

What happened?

Hello quasar people!
I was working on a PWA made with quasar and suddenly, when uploading it to my firebase hosting, I encounter the following error:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

I tried everything and the error does not go away. As a last resort, I decided to reinstall my windows from scratch, and try to implement a basic quasar spa, without modifying anything. But the error persists.
I have been working for years with quasar and firebase, and I have never had anything like this happen to me.
The basic spa is hosted at https://mcaenergy.web.app, in case you want to check the error.

The "quasar build -m spa" does it correctly, as well as the "firebase deploy".
I don't know what else to try, I thank you for your help already.

What did you expect to happen?

Just display the content of my webapp!

Reproduction URL

https://github.com/MandingaRadi/Error

How to reproduce?

In firebase hosting the "quasar icon" and the "productName" load correctly, but nothing else.
In github: not found error 404

in dev mode work's fine.

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Other

Quasar info output

Operating System - Windows_NT(10.0.19045) - win32/x64
NodeJs - 20.15.0

Global packages
  NPM - 10.8.1
  yarn - 1.22.22
  @quasar/cli - 2.4.1
  @quasar/icongenie - 4.0.0
  cordova - Not installed

Important local packages
  quasar - 2.16.4 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.9.3 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.11 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.30 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.4.0
  pinia - 2.1.7 -- Intuitive, type safe and flexible Store for Vue
  vuex - Not installed
  vite - 2.9.18 -- Native-ESM powered web dev build tool
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - DESKTOP-3CDAG8M
  Wi-Fi - 192.168.1.40

Relevant log output

No response

Additional context

No response

Copy link

Hi @MandingaRadi! 👋

It looks like you provided an invalid or unsupported reproduction URL.
Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub.
Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc.
Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

@MandingaRadi
Copy link
Author

Hi @MandingaRadi! 👋

It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

Done!

@MandingaRadi MandingaRadi changed the title Failed to load module script (MIME type of "text/html") Quasar build bug? Jun 24, 2024
@MandingaRadi
Copy link
Author

I tried using npm instead of yarn, webpack instead of vite and changing node 20 to node 18 and the problem persists. The weird thing is that I also did a clean install of windows, vscode, etc.
I don't know what else to try. I would appreciate any help.

@MandingaRadi
Copy link
Author

To rule out a problem with firebase hosting, I just created a simple html website and uploaded it. It shows it perfectly. There is definitely some problem in the compilation when I use quasar build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant