question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using with Quasar

See original GitHub issue

Describe the bug Using the BLE plugin with the Quasar framework crashes the app on launch with such an error

SyntaxError: The requested module '/src-capacitor/node_modules/throat/index.js?v=0f0edd62' does not provide an export named 'default' (at queue.ts:1:8)

To Reproduce Steps to reproduce the behavior:

  1. npm init quasar (Create new Quasar app)
    • What would you like to build? › App with Quasar CLI, let's go!
    • Pick Quasar version: › Quasar v2 (Vue 3 | latest and greatest)
    • Pick script type: › Typescript
    • Pick Quasar App CLI variant: › Quasar App CLI with Vite
    • Pick a Vue component style: › Composition API
    • Pick your CSS preprocessor: › Sass with SCSS syntax
    • Check the features needed for your project: › (None)
  2. Go to newly created project folder
  3. npx quasar mode add capacitor (Add capacitor platform)
  4. cd src-capacitor
  5. npm i @capacitor/core@latest @capacitor/cli@latest (Update capacitor from v2 to v3.6.0)
  6. npm i @capacitor-community/bluetooth-le (Install plugin)
  7. Open path/to/project/src/pages/IndexPage.vue
  8. Add import { BleClient } from '../../src-capacitor/node_modules/@capacitor-community/bluetooth-le'; (Import plugin)
  9. Inside setup () { ... } add before return
    
    const init = async () => {
      await BleClient.initialize();
    }
    
    onMounted(init);
    

Then for web 10. npx quasar dev (Runs app and opens browser) 11. Error in browser’s console

For android 10. npx quasar dev -m capacitor -T android (Adds android platform to the capacitor, builds the app, opens Android Studio) 11. Run the app in Android Studio 12. Inspect device (e.g. chrome://inspect/#devices) 13. Error in browser’s console

Expected behavior Plugin initializes successfully

Screenshots Screenshot 2022-07-19 at 11 03 03

Plugin version:

Desktop:

  • OS: macOS
  • Browser chrome
  • Version 103.0.5060.114

Smartphone:

  • Device: OnePlus Nord
  • OS: Android 11 Oxygen OS 11.1.11.11.AC01BA
  • Browser stock browser?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
masiamacommented, Jul 21, 2022

Thanks for the help. I solved the problem by installing Quasar into the already set up vite project instead of using Quasar CLI

0reactions
gbkwiattcommented, Aug 6, 2022

Would be nice if there is some proper solution for it. I am facing same issue currently, but creating vite project and adding quasar to it seems like a workaround and not a solution. I do understand it’s not an issue with plugin, but quasar. But maybe someone can help to tackle that down ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSR Handling of 404 and 500 Errors - Quasar Framework
quasar/app-vite) Managing the common 404 and 500 HTTP errors in a Quasar server-side rendered app.
Read more >
quasar build error · Discussion #11161 - GitHub
ts ERROR in /app/node_modules/vue-router/types/vue.d.ts(11,5): TS2717: Subsequent property declarations must have the same type. Property '$ ...
Read more >
How can I fix Quasar vuelidate eror-message type error
I'm using a "vuelidate" for validation of the Quasar framework. ... But error-message type were only defined as String type by Quasar team....
Read more >
Pinia error in Quasar framework : r/vuejs - Reddit
I'm facing this problem in the quasar framework. what can be the problem here? P.S. quasar do not have a main.js file.
Read more >
QUASAR error: /home/support - MacCoss Lab Software
Hello all. I have performed a calibration curve and I am trying to use QUASAR in order to calculate LOD and LLOQ. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found