Closed Harold-Anderson closed 1 month ago
Hi, sorry this is happening. I tried a fresh SvelteKit project with default svelte-clerk configs + imported createClerkClient
but never ran into that issue. Would you be able to send a basic reproduction?
Thank you
Could I ask you to upload an example of how to use the module? That might be quicker than trying to figure out all the mistakes I have made. Something like this, which I was able to build off of.
Here is a repository where I tried to use svelte-clerk. I really don't know how to use the components or functions.
Could I ask you to upload an example of how to use the module? That might be quicker than trying to figure out all the mistakes I have made. Something like this, which I was able to build off of.
Will sure do. Didn't expect Svelte to release v5 stable that fast! I'll surely update docs and have some examples.
For now, you can check the React SDK UI components as it is a 1:1 equivalent of the components in svelte-clerk
Thank you. I am really unable to figure out how to use it. I've uploaded another attempt, but it is just flailing without documentation and a demo site.
Here is a repository where I tried to use svelte-clerk. I really don't know how to use the components or functions.
I opened a PR for this one with some improvements and test routes
Thanks for the pull request. I have merged it. Here is the deployment to Cloudflare Pages https://[82634435.svelte-clerk.pages.dev](https://82634435.svelte-clerk.pages.dev/)/
That's awesome. Im closing this one for now and will be adding docs soon!
Any idea what I am doing wrong?
% pnpm run build
node:internal/event_target:1094 process.nextTick(() => { throw err; }); ^ file:///C:/Users/H/frontend/.svelte-kit/output/server/chunks/clerkClient.js:1 import { createClerkClient } from "@clerk/backend"; ^^^^^^^^^^^^^^^^^ SyntaxError: Named export 'createClerkClient' not found. The requested module '@clerk/backend' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@clerk/backend'; const { createClerkClient } = pkg;
Emitted 'error' event on Worker instance at: at [kOnErrorMessage] (node:internal/worker:326:10) at [kOnMessage] (node:internal/worker:337:37) at MessagePort. (node:internal/worker:232:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)
at MessagePort. (node:internal/per_context/messageport:23:28)