You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a locally installed svelte-kit component library project that I have linked it to my main svelte-kit app project.
I have used "my-lib": "link:../my-lib/package" to link this project to my svelte-kit app package.json.
When I build my main project using svelte-kit build, its unable to pickup the transient dependencies used by my component library.
A simple workaround is to install the dependency to my main project. Is this how it is expected to work. zI have raised this as
a bug because it feels like it is leaking the self-containment of my component library.
Reason I have raised this issue under this repo is because, I thought it might be related to #263
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'dayjs' imported from svelte-dependency-issue/my-app/.svelte-kit/output/server/entries/pages/__layout.svelte.js
at new NodeError (node:internal/errors:371:5)
at packageResolve (node:internal/modules/esm/resolve:930:9)
at moduleResolve (node:internal/modules/esm/resolve:976:18)
at defaultResolve (node:internal/modules/esm/resolve:1078:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
at link (node:internal/modules/esm/module_job:78:36)
I tried importing a sample lodash module - chunk in a separate node esm module based local project. I am getting a similar error when I try to do svelte-kit build with that project.
sveltejs/kit#4261 seems to be highlighting the same issue. As I too faced this issue in my rushjs + pnpm project.
I guess I will close this issue here as it seems to be an issue with the svelte-kit project.
Describe the bug
I have a locally installed
svelte-kit component library
project that I have linked it to my mainsvelte-kit app
project.I have used
"my-lib": "link:../my-lib/package"
to link this project to my svelte-kit apppackage.json
.When I build my main project using
svelte-kit build
, its unable to pickup the transient dependencies used by my component library.A simple workaround is to install the dependency to my main project. Is this how it is expected to work. zI have raised this as
a bug because it feels like it is leaking the self-containment of my component library.
Reason I have raised this issue under this repo is because, I thought it might be related to #263
Reproduction
/~https://github.com/bhvngt/svelte-dependency-issue/
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: