javascript: Clerk Expo errors/not working on all platforms and versions.

Package + Version

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • [ X ] @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • gatsby-plugin-clerk
  • build/tooling/chore
  • other:

Version:

0.12.5

Browser/OS

All

Description

App.js (1247:889)
Can't find variable: EventTarget
(Device)
  Evaluating module://@clerk/clerk-expo.js
  Evaluating module://App.js.js

This error happens on all platforms, on my local computer, with all package versions, etc. Not sure I am doing something wrong but I have attached an extremely basic sandbox.

https://snack.expo.dev/@eliotjackson/mature-popcorn

The clerk-expo-starter repo has the same problem. I’ve gone through all the clerk-expo versions back to .0.8.

Also tried what was suggested here

We have reproduced it locally and are working on a fix.

⚠️ Meanwhile, you can try using @clerk/clerk-expo@0.12.4 which is the latest working version. ⚠️

The problematic 0.12.5 version has been unpublished.

Update: It seems like it only happens on the first load. So if I comment out all entry points to anything Clerk at the root of my app, reload it (r) and then uncomment and let it fast refresh, everything works as it should.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Glad it’s working now and apologies for the hassle. We will ship the proper fix ASAP.

Ahhh amazing!! Thank you @SokratisVidros @sgrund14 !!

I have never been more confused in my life haha.

Just as a heads up in case someone else finds this thread before the fix and couldn’t follow. For now, you need to EXPLICITLY set "@clerk/clerk-js": "4.27.2" in your package.json because otherwise, it resolves to the latest version which is broken. This is why I could go all the way back to .0.8.1 and it still wouldn’t work/

aha, ok! added a resolution to "@clerk/clerk-js": "4.27.2" in my root package.json and the error is gone without the polyfill 😄 thanks much