https://supertokens.com/ logo
Import error
p

PPaii

05/21/2023, 3:27 AM
Hi i got this error. Which package should i install

https://cdn.discordapp.com/attachments/644849840475602944/1109683871089430639/2023-05-21_11.27.06.png

r

rp

05/21/2023, 4:28 AM
Hey @PPaii have you installed supertokens-auth-react package? And also which version?
p

PPaii

05/21/2023, 8:20 AM
package json : "supertokens-auth-react": "^0.32.3" yarn-lock: supertokens-auth-react@^0.32.3
r

rp

05/21/2023, 8:21 AM
thanks. Can you open an issue about this please? Also, which bundler are you using?
since you are using
yarn
, you should also run
yarn add supertokens-web-js
. Have you already done that? If not, can you do that and try again?
can you import from
"supertokens-auth-react/recipe/emailverification/prebuiltui"
p

PPaii

05/21/2023, 8:24 AM
Hi I am using next js. I hv already installed supertokens-web-js and the version is "^0.5.0"

https://cdn.discordapp.com/attachments/1109683871370453063/1109758593865105468/2023-05-21_4.22.38.png

r

rp

05/21/2023, 8:26 AM
can you import from "supertokens-auth-react/recipe/emailverification/prebuiltui"
p

PPaii

05/21/2023, 8:26 AM
for EmailVerificationPreBuiltUI ?
r

rp

05/21/2023, 8:26 AM
yea
p

PPaii

05/21/2023, 8:27 AM
Got this now

https://cdn.discordapp.com/attachments/1109683871370453063/1109759238944862218/2023-05-21_4.26.53.png

r

rp

05/21/2023, 8:27 AM
what's your supertokens.init on the frontend config look like?
p

PPaii

05/21/2023, 8:28 AM

https://cdn.discordapp.com/attachments/1109683871370453063/1109759530541264916/2023-05-21_4.28.01.png

r

rp

05/21/2023, 8:28 AM
and how are you importing EmailPasswordPreBuiltUI?
p

PPaii

05/21/2023, 8:31 AM
In _app.tsx and [[...path]].tsx

https://cdn.discordapp.com/attachments/1109683871370453063/1109760367422345236/2023-05-21_4.29.58.png

https://cdn.discordapp.com/attachments/1109683871370453063/1109760367942455346/2023-05-21_4.30.55.png

r

rp

05/21/2023, 8:32 AM
remove the canHandleRoute block from _app.tsx
and also add the email verification pre built UI thing in [[...path]].tsx
p

PPaii

05/21/2023, 8:35 AM
Do you mean like this. ?

https://cdn.discordapp.com/attachments/1109683871370453063/1109761433509564526/2023-05-21_4.35.33.png

r

rp

05/21/2023, 8:44 AM
please see our docs
and example apps
you also need to add EmailVerificationPreBuildUI to the getRoutingComponent funciton call (as explained in our docs)
p

PPaii

05/21/2023, 8:47 AM
For next js ?