Open anirudhsama opened 1 year ago
@anirudhsama this library doesn't contain CJS code, just ESM:
Maybe your bundler expects it to be CJS?
Oh that might be the case. I'm using it in a Nextjs Edge runtime.
I can only import it like this: import { verifyIdToken } from 'web-auth-library/dist/google'
Still running into this. package export is broken.
I have the same problem
I have the same problem. @maccman's import helped me get the library working though.
It might be related to how the exports are defined in package.json?
Top-level types
field is missing which might cause issues?
"exports": {
".": "./dist/index.js",
"./jwt": "./dist/core/jwt.js",
"./google": {
"types": "./dist/google/index.d.ts",
"import": "./dist/google/index.js",
"default": "./dist/google/index.js"
},
"./package.json": "./package.json"
},
Same issue here. Looks like there is a pending PR with a fix & few more issues opened all referencing this problem. Can this be fixed? Do you need help with that?
Likewise, still having this issue with types being missing.
Hi,
Im trying to import the library using
import { getAccessToken } from "web-auth-library/google";
but I'm getting any errorWhat am I doing wrong?