the magic guy
the magic guy
Explore posts from servers
SSolidJS
Created by the magic guy on 4/25/2024 in #support
Vite error when evaluating SSR module
Getting this error when navigating to a route
2:52:46 p.m. [vite] Error when evaluating SSR module #vinxi/handler/ssr: failed to import "/src/entry-server.tsx"
|- TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)

[h3] [unhandled] TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9) {
cause: TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9),
statusCode: 500,
fatal: false,
unhandled: true,
statusMessage: undefined,
data: undefined
}
2:52:46 p.m. [vite] Error when evaluating SSR module #vinxi/handler/ssr: failed to import "/src/entry-server.tsx"
|- TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9)

[h3] [unhandled] TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9) {
cause: TypeError: __vite_ssr_import_0__.template is not a function
at eval (/home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/@solidjs/start/dist/server/renderAsset.jsx:11:52)
at async instantiateModule (file:///home/shawn/projects/gh_actions_dashboard/solid-project/node_modules/vite/dist/node/chunks/dep-DkOS1hkm.js:55036:9),
statusCode: 500,
fatal: false,
unhandled: true,
statusMessage: undefined,
data: undefined
}
This started happening when I started using suid material. I have also set SSR to false in app.config.ts:
export default defineConfig({
ssr: false,
solid: {
ssr: false
},
vite: {
plugins: [suidPlugin(), solidPlugin()],
},
});
export default defineConfig({
ssr: false,
solid: {
ssr: false
},
vite: {
plugins: [suidPlugin(), solidPlugin()],
},
});
Feels like im missing smth pretty simple here....
3 replies
SSolidJS
Created by the magic guy on 4/23/2024 in #support
Wrapping `<FileRoutes />` in `ErrorBoundry`
No description
5 replies
SSolidJS
Created by the magic guy on 8/10/2023 in #support
solid start `npm run build` hangs in docker container
51 replies
SSolidJS
Created by the magic guy on 8/7/2023 in #support
createResource / Suspense blocks rendering
Im trying to understand how to handle async data fetching. Taking an example from the docs, with some modifications. This component seem to block rendering for 5 seconds, before displaying Data fetched from API, rather than showing the fallback in the Suspense element while the setTimeout is happening. I feel like im not understanding something here...
import { createResource, Suspense } from "solid-js";

async function fetchData(): Promise<string> {
return new Promise((resolve) => {
setTimeout(() => {
resolve("Data fetched from API");
}, 5000); // Simulate a 2-second delay
});
}
export default function () {
const [resource] = createResource(fetchData);

return (
<Suspense fallback={<p>loading...</p>}>
<div>HELLO WORLD</div>
{resource()}
</Suspense>
);
}
import { createResource, Suspense } from "solid-js";

async function fetchData(): Promise<string> {
return new Promise((resolve) => {
setTimeout(() => {
resolve("Data fetched from API");
}, 5000); // Simulate a 2-second delay
});
}
export default function () {
const [resource] = createResource(fetchData);

return (
<Suspense fallback={<p>loading...</p>}>
<div>HELLO WORLD</div>
{resource()}
</Suspense>
);
}
11 replies
BDA400 Introduction to Big Data
Anyone taking this course, any thoughts?
4 replies
KVM switch recommendations
Looking for a KVM switch for 4 computers. Was browsing Amazon earlier, seems like they all got mixed reviews. Wondering if anyone has a good experience with a particular KVM switch. Preferably from Amazon.
36 replies
CPSComputer Programming - Seneca Polytechnic College
Created by the magic guy on 12/11/2022 in #ask-a-question
Working with server side rendered content in angular
Say I have an api, that generates some server side rendered content, using express. The generated html and css and such is exposed via the api. How would I handle rendering this content in angular? I'm able to talk to the api to get the html and stuff, but then idk what to do with the content I get back.
6 replies