S
SolidJS•14mo ago
damon

Solid Start error

https://damon.systems/projects When loading the page it gets loaded I ge tthis error saying l is null and it looks unrelated to my component, and it works locally I dont really know where to go from here. Here is the component: https://github.com/day-mon/damon.systems/blob/main/src/routes/projects.tsx
damon
damon is a software engineer based in the u.s.a.
GitHub
damon.systems/src/routes/projects.tsx at main · day-mon/damon.systems
personal website made in svelte. Contribute to day-mon/damon.systems development by creating an account on GitHub.
80 Replies
Tommypop
Tommypop•14mo ago
Hi, it might be worth using a resource rather than signals for fetching your data, as it has built in error handling functionality as well as a loading state signal You're probably hitting a different branch in production, and accessing a property on something that is undefined
damon
damon•14mo ago
the weird thing is I ran the docker file i use when deployed and it works fine its only when deployed on my vps i ge these weird errors
Tommypop
Tommypop•14mo ago
Difference in session storage? Seeing as you try to fetch from there first Maybe try logging which if branches you reach and see if there's a difference between local deployment and vps deployment?
damon
damon•14mo ago
I can add in a version number but it builds the docker file on the main branch and i build and run the docker ifle off the main branch so im just confused
Tommypop
Tommypop•14mo ago
I mean code branches, like blocks within if/else statements
damon
damon•14mo ago
aah
Tommypop
Tommypop•14mo ago
Sorry for being unclear lol
damon
damon•14mo ago
So your suggestion is to not use signals? to store the projects?
Tommypop
Tommypop•14mo ago
Resources wrap signals And make async data fetching and error handling easier https://docs.solidjs.com/references/api-reference/basic-reactivity/createResource So you can check if the resource has errored or loaded And access the data by calling the accessor returned
damon
damon•14mo ago
okay ill give it a try
Tommypop
Tommypop•14mo ago
You can then wrap in suspense so the component waits until the data has finished loading before it shows
damon
damon•14mo ago
Yeah thanks i guess i gotta read the docs more I have no clue what any of that is thank you for letting me know
Tommypop
Tommypop•14mo ago
The type signatures are super hard to read
Tommypop
Tommypop•14mo ago
Tommypop
Tommypop•14mo ago
This section is probably what you want
Want results from more Discord servers?
Add your server