[React-Vitejs] TypeError: Super expression must either be null or a function #2546
Open
4 tasks done
Labels
bug
This points to a verified bug in the code
Checklist
Description
I'm currently working on a React application using vitejs framework and I want use auth0-lock for authenticating users. But when I import
Auth0Lock
orAuth0LockPasswordless
from "auth0-lock", I'm getting this errorTypeError: Super expression must either be null or a function
.React:
v18.2.0
Vite:
v5.2.0
auth0-lock:
v12.4.0
Searched issues: I've checked #1257 but that doesn't seem to be my problem/solution
Searched community: Couldn't find any solutions for this issue
It's throwing error on initial loading itself. I'm sharing my code and error below:
My code:
Full error:
Reproduction
yarn create vite
auth0-lock
using the commandyarn add auth0-lock
Auth0LockPasswordless
in yourApp.jsx
and initialize it.yarn dev
React:
v18.2.0
Vite:
v5.2.0
auth0-lock:
v12.4.0
Additional context
What I've tried:
vite.config.js
but it didn't work.vite-plugin-commonjs
and that also doesn't seem to workMy package.json
Lock version
12.4.0
Which browsers have you tested in?
Chrome, Edge, Firefox
The text was updated successfully, but these errors were encountered: