-
Notifications
You must be signed in to change notification settings - Fork 3
[cli] broken netzo deploy
due to import paths
#130
Comments
So deploying the Workaround: After adding a Issue: I'm guessing this has to do with the // netzo/plugins/components/plugin.ts
export const components = (options?: ComponentsConfig): Plugin => {
// ...
return {
...unocss({ options: { color, radius }, config, aot, ssr, csr }), // { name, entrypoints, renderAsync, buildStart }
name: "components",
islands: {
baseLocation: import.meta.url,
paths: [
"../../components/layout/footer.tsx",
"../../components/layout/header.tsx",
"../../components/layout/nav.tsx",
"../../components/layout/nav.mobile.tsx",
],
},
};
}; causing the |
Fixed by https://github.com/netzo/netzo/releases/tag/0.4.39 Issue: As mentioned above, the deployment issue for the Solution: remove the island registration from |
Sorry, somehow I don't get it. Can you please clarify further? When I started the project locally it worked just fine. I'm still unclear why the deployment failed. |
Sure @deer, the deployment failing was due to the // netzo/plugins/components/plugin.ts
export const components = (options?: ComponentsConfig): Plugin => {
// ...
return {
...unocss({ options: { color, radius }, config, aot, ssr, csr }), // { name, entrypoints, renderAsync, buildStart }
name: "components",
islands: {
baseLocation: import.meta.url,
paths: [
"../../components/layout/footer.tsx",
"../../components/layout/header.tsx",
"../../components/layout/nav.tsx",
"../../components/layout/nav.mobile.tsx",
],
},
};
}; and the app not importing/using them anywhere. This was only an issue with the I'm not entirely sure why this breaks only on deployment (since both work locally totally fine), but I suspect that it has to do with the module resolution logic for injected islands over at fresh. If its not on fresh's side, then it might be module resolution on the Subhosting side, since the "deploy" subcommand really only does a In any case, what https://github.com/netzo/netzo/releases/tag/0.4.39 does to fix this is simply define a local // NOTE: re-export specific components from islands/ for reactivity
export * from "netzo/components/layout/mod.ts"; and then simply import from there |
See #https://github.com/netzo/netzo/issues/129
For reference, I just did
netzo init crm
and thennetzo deploy
and it did work:but
netzo init minimal
and thennetzo deploy
failed:Both tested with
netzo@0.4.37
. This helps narrowing down the cause, I will continue investigating... The strange thing is thathttps://deno.land/x/netzo@0.4.37/components/layout/footer.tsx
appears to not be found, but it does indeed exists (we can navigate to it).The text was updated successfully, but these errors were encountered: