yjs / y-indexeddb

IndexedDB database adapter for Yjs
https://docs.yjs.dev/ecosystem/database-provider/y-indexeddb
Other
196 stars 30 forks source link

indexdb not defined #39

Closed MentalGear closed 5 months ago

MentalGear commented 5 months ago

Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.

Checklist

Describe the bug Thanks for providing this, but when trying to install this, I get the error 'indexdb not defined'. Maybe the documentation/readme is outdated, as whenSynced also seems not available anymore.

To Reproduce Steps to reproduce the behavior:

  1. install latest version
  2. Follow readme
  3. check console

Environment Information

Additional context

  System:
    OS: macOS 10.15.7
    CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
    Memory: 2.87 GB / 40.00 GB
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 7.10.0 - ~/node_modules/.bin/npm
  npmPackages:
    @playwright/test: ^1.41.2 => 1.41.2 
    @sinclair/typebox: ^0.32.14 => 0.32.14 
    @sveltejs/adapter-auto: ^3.1.1 => 3.1.1 
    @sveltejs/adapter-static: ^3.0.1 => 3.0.1 
    @sveltejs/kit: ^2.5.0 => 2.5.0 
    @sveltejs/vite-plugin-svelte: ^3.0.2 => 3.0.2 
    @types/eslint: 8.56.0 => 8.56.0 
    @typescript-eslint/eslint-plugin: ^6.21.0 => 6.21.0 
    @typescript-eslint/parser: ^6.21.0 => 6.21.0 
    autoprefixer: ^10.4.16 => 10.4.16 
    bits-ui: ^0.18.1 => 0.18.1 
    clsx: ^2.1.0 => 2.1.0 
    eslint: ^8.56.0 => 8.56.0 
    eslint-config-prettier: ^9.1.0 => 9.1.0 
    eslint-plugin-svelte: 2.36.0-next.5 => 2.36.0-next.5 
    formsnap: ^0.5.0 => 0.5.0 
    lucide-svelte: ^0.336.0 => 0.336.0 
    mode-watcher: ^0.2.1 => 0.2.1 
    postcss: ^8.4.32 => 8.4.35 
    postcss-load-config: ^5.0.2 => 5.0.2 
    prettier: ^3.2.5 => 3.2.5 
    prettier-plugin-svelte: ^3.2.1 => 3.2.1 
    prettier-plugin-tailwindcss: ^0.5.9 => 0.5.9 
    sass: ^1.71.1 => 1.71.1 
    svelte: 5.0.0-next.69 => 5.0.0-next.69 
    svelte-check: ^3.6.4 => 3.6.4 
    sveltekit-superforms: ^2.5.0 => 2.5.0 
    tailwind-merge: ^2.2.1 => 2.2.1 
    tailwind-variants: ^0.2.0 => 0.2.0 
    tailwindcss: ^3.3.6 => 3.3.6 
    tslib: ^2.6.2 => 2.6.2 
    typescript: ^5.3.3 => 5.3.3 
    vaul-svelte: ^0.2.3 => 0.2.3 
    vite: ^5.1.1 => 5.1.1 
    vitest: ^1.2.2 => 1.2.2 
    y-indexeddb: ^9.0.12 => 9.0.12 
    yjs: ^13.6.14 => 13.6.14 
    zod: ^3.22.4 => 3.22.4 
dmonad commented 5 months ago

I'll eat my hat if anyone can reproduce it like this.

Please try again with more detailed steps for reproduction.

Just a wild wild guess: you are trying to use y-indexeddb in the svelte backend (which is probably not what you intended to do).