filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

Error initialising the filestack library in Quasar 2 #493

Closed yoyosan closed 1 year ago

yoyosan commented 1 year 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

Your Environment

Version used: 3.25.0
Browser Name and version: Chrome Version 107.0.5304.110
Operating System and version (desktop or mobile): Fedora 36
yoyosan commented 1 year ago

Temporary solution until Quasar upgrades to Vite 4, https://github.com/quasarframework/quasar/issues/14753#issuecomment-1353203218