beyonk-group / svelte-google-analytics

Google Analytics component for Svelte
77 stars 12 forks source link

Failed to resolve import "@beyonk/async-script-loader" #25

Closed jhwheeler closed 2 years ago

jhwheeler commented 2 years ago

I've installed the package and imported it to my __layout.svelte file (I'm using SvelteKit w/ Svelte v3.34.0), but I get this error on build:

CleanShot 2022-04-23 at 14 41 38@2x

Any idea why the async script loader isn't being resolved?

Thanks!

Kapelianovych commented 2 years ago

It's simply because @beyonk/async-script-loader is defined as a development dependency. You can work around that by installing that package by yourself.

antony commented 2 years ago

Ah yes looks like this should have been a production dependency. Happy to accept a PR to fix.

jhwheeler commented 2 years ago

Gotcha, thanks!