Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a declaration file for module '@plasmicapp/loader-svelte' #32

Open
arenzel opened this issue Mar 16, 2022 · 1 comment
Open

Comments

@arenzel
Copy link

arenzel commented Mar 16, 2022

Hi there,

I'm trying to integrate Plasmic withing my SvelteKit app, and when importing @plasmicapp/loader-svelte, I've got this error message:

Could not find a declaration file for module '@plasmicapp/loader-svelte'. '/Users/[path]/sveltekit-app-test/node_modules/@plasmicapp/loader-svelte/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/plasmicapp__loader-svelte` if it exists or add a new declaration (.d.ts) file containing `declare module '@plasmicapp/loader-svelte';` ts(7016)

I've tried the command npm i --save-dev @types/plasmicapp__loader-svelte and got:

Not Found - GET https://registry.npmjs.org/@types%2fplasmicapp__loader-svelte - Not found

This error doesn't prevent Svelte from compiling.
Interestingly: there is no such error when importing @plasmicapp/loader-react.


EDIT: the workaround exposed here works:

// src/lib/loader-svelte.d.ts
declare module '@plasmicapp/loader-svelte';
@NafunaAfrica
Copy link

had the same issue with ghost cms. So when you create the file then what? What do you do with it?Imp[ort it into the original svelte?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants