quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.97k stars 3.52k forks source link

Error initialising the filestack library #14753

Closed yoyosan closed 1 year ago

yoyosan commented 2 years ago

What happened?

Initializing the Filestack library throws the following error, filestack-js.js?v=4a9cfdec:13 Uncaught TypeError: Class extends value undefined is not a constructor or null

What did you expect to happen?

No error should be thrown. I've tried the same piece of code in new Vite with Vue3 and Nuxt 3 projects and there's no error thrown.

Reproduction URL

https://stackblitz.com/edit/quasarframework-r2qn2u?file=src%2FApp.vue

How to reproduce?

Just open the Dev Toolbar and you'll see the error immediately.

Flavour

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

Areas

Components (quasar), Project Creation (create-quasar), TypeScript Support

Platforms/Browsers

Firefox, Chrome

Quasar info output

Operating System - Linux(5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36) - linux/x64
NodeJs - 16.14.2

Global packages
  NPM - 7.17.0
  yarn - 1.22.19
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.9.2 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.1.2 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.15.4 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.40 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.1.5
  pinia - Not installed
  vuex - Not installed
  vite - 2.9.15 -- Native-ESM powered web dev build tool
  eslint - 8.24.0 -- An AST-based pattern checker for JavaScript.
  electron - 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 - quasarframework-r2qn2u
  en0 - 192.168.1.104

Relevant log output

Uncaught TypeError: Class extends value undefined is not a constructor or null
    at __extends (filestack-js.js?v=52a3776c:13:11)
    at filestack-js.js?v=52a3776c:5680:7
    at node_modules/filestack-js/build/module/lib/request/adapters/http.js (filestack-js.js?v=52a3776c:5702:6)
    at __init (chunk-S5KM4IGW.js?v=5987339c:15:56)
    at filestack-js.js?v=52a3776c:11261:23
__extends @ filestack-js.js?v=52a3776c:13
(anonymous) @ filestack-js.js?v=52a3776c:5680
node_modules/filestack-js/build/module/lib/request/adapters/http.js @ filestack-js.js?v=52a3776c:5702
__init @ chunk-S5KM4IGW.js?v=5987339c:15
(anonymous) @ filestack-js.js?v=52a3776c:11261

Additional context

No response

yoyosan commented 2 years ago

I've also opened an issue with Filestack and they said,

I can confirm to you that Filestack does not currently support Quasar. I will be raising a feature request for consideration by the product team.

rstoenescu commented 1 year ago

Filestack should only make sure that it runs with Vite. Nothing in particular with Quasar for supporting it. Seems like Vite 4 has solved this issue, so temporarily (until the Quasar CLI gets released with Vite 4), add this to your /package.json (and use Yarn v1):

"resolutions": {
    "vite": "^4.0.0",
    "@vitejs/plugin-vue": "^4.0.0"
  }