Closed aircliff01 closed 2 years ago
Hi @aircliff thanks for using this project.
To answer to your problem, you can see the previous issue #136 and the miracle will be there :)
All is in ESM
in this project and Nexts.js
is in CJS
so you have to transpile by your own.
Hello @aircliff, that issue ran a bit long so here's a link directly to that issue's solution. Can you try that and let me know how it goes?
https://github.com/MasterKale/SimpleWebAuthn/issues/136#issuecomment-893506455
Well y'all are super fast with your response 🤟 . I checked the linked issue and abracadabra there lies the solution, works like magic 🎉 thanks @MasterKale @akanass I will close this issue. Sorry for the duplicate.
I'm running into this error while using it in next.js. When I changed this line
simplewebauthn/browser/dist/bundle/index.js (123)
fromexports { browserSupportsWebauthn, platformAuthenticatorIsAvailable, startAuthentication, startRegistration };
tomodule.exports = { browserSupportsWebauthn, platformAuthenticatorIsAvailable, startAuthentication, startRegistration };
then it works fine. Not sure if its related to your tsconfig target or not. I tried adjusting my tsconfig file to differenttarget
andmodule
output but none worked.im using nextjs.
below is my tsconfig: