'default' is not exported by auth0-spa-js.production.esm.js
rvsjoen opened this issue · comments
Describe the problem
After upgrading to version 2.0.0, having problems with the module export
'default' is not exported by node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js, imported by src/plugins/auth0/index.js
1: import createAuth0Client from "@auth0/auth0-spa-js";
^
2: import { computed, reactive, watchEffect } from "vue";
error during build:
Error: 'default' is not exported by node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js, imported by src/plugins/auth0/index.js
Environment
- **Version of
auth0-spa-js
used: 2.0.0 - **Which browsers have you tested in? - Chrome
- **Which framework are you using, if applicable (Angular, React, etc): Vue3 (3.2.45), building with Vite 2.5.4
Thanks for reaching out.
Did you take a look at the Migration Guide, more specifically, the section that covers the fact that we dropped the default export?
You'll want to use:
import { createAuth0Client } from "@auth0/auth0-spa-js";
Would that help?
Thank you, I completely dropped the ball on this one - our code has been rewritten based on the migration guide and everything is OK.