Closed jakearchibald closed 2 years ago
I'm aware the jsdelivr URLs in the readme don't work, as the full version isn't published, but the beta versions work:
I am getting an error that there is not match for import "deleteDb" and "openDp".
Here are the messages:
.svelte-kit/output/server/chunks/index.esm2017-276b2b5e.js:22:9: error: No matching export in "node_modules/.pnpm/idb@7.0.0-beta/node_modules/idb/build/index.js" for import "openDb" 22 │ import { openDb, deleteDb } from "idb"; ╵
~~.svelte-kit/output/server/chunks/index.esm2017-276b2b5e.js:22:17: error: No matching export in "node_modules/.pnpm/idb@7.0.0-beta/node_modules/idb/build/index.js" for import "deleteDb" 22 │ import { openDb, deleteDb } from "idb";
It looks like Vite is ignoring the type module. When I changed the extension to "mjs" like in the pull request it didn't error out.
Sorry for all those comments but it looks like the error comes from "firebase/messaging", which is why some of the changes here were made.
@abdo643-HULK does this version solve the problem?
@abdo643-HULK does this version solve the problem?
It works with sveltekit/vite without any issues but I am working on updating idb in firebase message and trying it out.
Even 6.1.5 works fine. The problem lies in "firebase/messaging" using version 3.
After forking firebase and rewriting everything to use version 6.1.5 and also 7, and including it to my project, vite doesn't complain about it not exporting deleteDB and openDB. But it now complains because it cannot find the old version "openDb" and I am not able to locate the responsible file. I even updated the idb Manager.
@abdo643-HULK see https://github.com/jakearchibald/idb/blob/main/changes.md#breaking-changes. 4.x was a significant change.
@abdo643-HULK see https://github.com/jakearchibald/idb/blob/main/changes.md#breaking-changes. 4.x was a significant change.
I fixed the naming and added the upgrade method as an option. But there is still something using the old naming and I can't seem to find it and I don't think it's in the messaging package.
The error I am getting:
.svelte-kit/output/server/chunks/index-0785e1aa.js:1:571: error: No matching export in "node_modules/.pnpm/idb@7.0.0-beta/node_modules/idb/build/index.js" for import "openDb" 1 │ ...as l,E as d,b as f,F as p}from"./index.esm2017-29696b89.js";import{openDb as g,openDB as h,deleteDB as y}from"idb";const m="@firebase/instal
The error I am getting:
.svelte-kit/output/server/chunks/index-0785e1aa.js:1:571: error: No matching export in "node_modules/.pnpm/idb@7.0.0-beta/node_modules/idb/build/index.js" for import "openDb" 1 │ ...as l,E as d,b as f,F as p}from"./index.esm2017-29696b89.js";import{openDb as g,openDB as h,deleteDB as y}from"idb";const m="@firebase/instal
I found the error. Because I still have firebase installed and also my version from github it was always importing the firebase version of "firebase/installation", because I am using the source files instead of compiling the packages and using those. But using version 6.1.5 and 7 resolved the commonjs error that people using sveltekit and vite were getting with firebase messaging
Published as https://www.npmjs.com/package/idb/v/7.0.0-beta - I'd appreciate some feedback and testing!