capacitor community sqlite: TypeError: x is not a function upon startup, after upgrading to capacitor version 6

Minimum reproducible example:

https://github.com/folsze/capacitor-v6-sqlite-x-is-not-a-function

capacitor community sqlite: TypeError: x is not a function upon startup, after upgrading to capacitor version 6

when I start my angular ionic capacitor community sqlite app, I get:

ERROR TypeError: x is not a function

in the browser console

Steps to reproduce the behavior:

  1. clone this repo: https://github.com/folsze/capacitor-v6-sqlite-x-is-not-a-function
  2. start the app in the desktop browser with npm start
  3. check the console, you will see the error “TypeError: x is not a function”
  4. Expected behavior: No error

Desktop (please complete the following information):

  • MacOS: 14.5 (23F79)
  • Browser: Chrome
  • Version 126.0.6478.183 (Official Build) (arm64)

related github issue:

https://github.com/capacitor-community/sqlite/issues/574