plasmic
plasmic copied to clipboard
Could not find a declaration file for module '@plasmicapp/loader-svelte'
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';
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?