Closed ziedHamdi closed 8 months ago
I must say, I have no idea of how the vite compiler works, so I tried the solutions on the web as is: changing tsconfig in different ways, removing type:module from package.json, adding inlining in vite.config.js deps: { inline: ['user-credits'], },
But it's all obscure navigation for me, I don't understand what I'm doing by doing that as I'm new to sveltekit, vite and even TS
I solved the issue, it is the first time I published an npm, so I didn't know I had to add a files section in package.json
Describe the bug
I'm trying to connect two libraries I wrote: one as a backend library and one for the svelete frontend.
When trying with the backend library locally (pnpm link) I get the error
I don't know if is interesting here, this is the code of index.js:
If I unlink my library and add it from npm, I get the error:
I tried every solution on the web but none worked for me for both these cases.
Reproduction
For the error
Add user-credits and try to run the project:
pnpm add user-credits
pnpm dev
For the error:
Clone the backend lib: https://github.com/ziedHamdi/UserCredits.git Clone: https://github.com/ziedHamdi/svelte-user-credits.git
Go to the first directory and link the lib as a global dependency, then use it in the second:
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response