feathers icon indicating copy to clipboard operation
feathers copied to clipboard

Uncaught (in promise) SyntaxError: when trying quasar framework to develop capacitor mobile app

Open haniyasin opened this issue 2 years ago • 1 comments

Steps to reproduce

PS: Quasar dev (i.e for web no issues) create a quasar project , to connect to a feathers service using quasar mode add capacitor quasar dev -m capacitor -T android

(First please check that this issue is not already solved as described here - if it is a general question or suggestion please start a Discussion)

  • [x] Tell us what broke. The more detailed the better. inspecting the android studio emulator in chrome using chrome://inspect/#devices an error preventing the app to show the login page: Uncaught (in promise) SyntaxError: Unexpected token . at Object.../../node_modules/@feathersjs/hooks/script/base.js (vendor.js:11270) at webpack_require (app.js:261) at fn (app.js:614) at eval (index.js?cb9c:14) at Object.../../node_modules/@feathersjs/hooks/script/index.js (vendor.js:11303) at webpack_require (app.js:261) at fn (app.js:614) at eval (application.js?fa31:10) at Object.../../node_modules/@feathersjs/feathers/lib/application.js (vendor.js:238) at webpack_require (app.js:261)
  • [x] If you can, please create a simple example that reproduces the issue and link to a gist, jrepo, etc. This makes it much easier for us to debug and issues that have a reproducible example will get higher priority. this is a simple repository to reproduce the issue with feathers dependencies only https://github.com/haniyasin/quasar-webpack index page gets rendered correctly in android emulator , but trying to access the login route the issue is reproduced

Expected behavior

should run same as web Tell us what should happen

Actual behavior

Tell us what happens instead

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

NodeJS version:v18.12.1

Operating System: windows 11

Browser Version: chrome latest, capacitor 5

React Native Version:NA

Module Loader: webpack i am using npm workspaces "dependencies": { "@feathersjs/authentication-client": "^5.0.8", "@feathersjs/feathers": "^5.0.8", "@feathersjs/socketio-client": "^5.0.8", "@quasar/cli": "^2.3.0", "@quasar/extras": "^1.16.4", "@tanstack/vue-query": "^4.35.3", "@vueuse/rxjs": "^10.5.0", "core-js": "^3.6.5", "devextreme": "23.1", "devextreme-vue": "23.1", "dexie": "^3.2.4", "json-logic-js": "^2.0.2", "papaparse": "^5.4.1", "pinia": "^2.0.11", "quasar": "^2.6.0", "rxjs": "^7.8.1", "socket.io-client": "^4.7.2", "vue": "^3.3.7", "vue-i18n": "^9.0.0", "vue-router": "^4.2.5" }, "devDependencies": { "@quasar/app-webpack": "^3.0.0" },

haniyasin avatar Nov 08 '23 06:11 haniyasin

While this is the default in newer versions of Webpack you may have to include the Feathers modules to be transpiled.

{
  test: /\.jsx?$/,
  exclude: /node_modules(\/|\\)(?!(@feathersjs|debug))/,
  loader: 'babel-loader'
}

daffl avatar Nov 28 '23 16:11 daffl