Closed jilio closed 1 year ago
Oh, apparently it's not related to clerk, but vite as this helps:
<script>window.global = window;</script>
Hello @jilio and thanks for the report :) You are correct - this is related to Vite, however we're going to add a simple global polyfill with our next release to improve DX for Vite projects.
pk_test_dWx0aW1hdGUtZG9yeS0yMC5jbGVyay5hY2NvdW50cy5kZXYk
Package + Version
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
@clerk/chrome-extension
gatsby-plugin-clerk
build/tooling/chore
Dependencies + versions
Provide a json with the dependencies used in your project (copy paste from yarn.lock / package-lock.json) or a github project / template that reproduces the issue.
*Include the @clerk/ packages and their versions!**
Example:
Browser/OS
If applicable e.g.
Chrome {version}
,Node {version}
,Bun {version}
,Cloudflare worker {version}
Safari 16.2 (18614.3.7.1.5) Vivaldi (Chromium inside) 5.7.2921.65
Description
My app works fine in production environment, but in dev environment it tells me:
When I specify
global
viavite.config.ts
like this:I get the following error:
Previously it worked like a charm in dev environment as well, but recently it stopped to do so. Could you advise how to befriend clerkjs and vite in dev env please?