Replies: 3 comments 6 replies
-
This happens because Basically, assuming your ui package is located at As for workarounds, I'm not sure whats best. You could add a workspace to your monorepo at A possibility I haven't looked into (I haven't had the need/chance to) is reexporting {
"exports": {
"./package.json": "./package/package.json"
}
} This might successfully trick node into using the |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same issue, have you managed to solve it? |
Beta Was this translation helpful? Give feedback.
-
I'm currently working on a project management CLI which aims to make the sveltekit monorepo experience seamless. It's still being designed but I've got a lot of the groundwork finalised. I'll share the link to the project once it's ready for use. |
Beta Was this translation helpful? Give feedback.
-
I am trying to setup a monorepo with turborepo and pnpm where two apps built on SvelteKit will use a shared UI components library.
I tried setting up the UI library with create-svelte. In my
lib/index.ts
I try to import my onlyButton.svelte
component, which is in the same folder, asimport Button from './Button.svelte'
but even this gives me a TS error:Cannot find module './Button.svelte' or its corresponding type declarations.ts(2307)
although it builds fine.Then, when trying to add this to my two apps as such:
I get a similar error on importing:
Cannot find module 'ui' or its corresponding type declarations.ts(2307)
When running the dev server, I get:
Any help with setting up a SvelteKit library would be highly appreciated!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions