basaran / svelte-recaptcha-v2

Google reCAPTCHA v2 implementation for Svelte SPA, SSR and sveltekit static sites.
https://basaran.github.io/svelte-recaptcha-v2/demo
MIT License
42 stars 14 forks source link

Debug/Browser.js does not provide an export named 'default' #7

Closed bridge-jithesh closed 4 months ago

bridge-jithesh commented 2 years ago

I am having the below error while doing import { Recaptcha, recaptcha, observer } from "svelte-recaptcha-v2";

SyntaxError: The requested module '/node_modules/debug/src/browser.js?v=9e58a267' does not provide an export named 'default'

I am using:

"@sveltejs/kit": "^1.0.0-next.221"
"@sveltejs/adapter-node": "^1.0.0-next.55"
"svelte-recaptcha-v2": "^0.0.2"
basaran commented 2 years ago

hi, it's been very busy lately and I haven't had a chance to address this yet. For some reason, the newer version of sveltekit is having trouble bundling the dependencies. Can you try deleting the node_modules/.vite folder and disabling the sveltekit during dev and see if that works?

I will have to create a ticket with the upstream to look into this, another option would be to clone the component from git and strip out the debug import and statements. A simple find and replace should do the trick.

Iuriy-Budnikov commented 2 years ago

+1

Zachiah commented 2 years ago

Just add debug to your svelte.config.js.kit.vite.optimizeDeps.include

basaran commented 4 months ago

Hello, I will make a new push to NPM this week, and will sort this out.