Luka
Luka
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
I think I should upload the map data to postgresql and then make fetch request to my nodejs server which will return images/tiles. I tried other ways but I have limits all the time.
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
So I am meaning if 10-20 user concurently fetches the map will it work for all of them? because openstreetmap was also open source but later i found they had 1 request per second limit so I want to avoind any api limits
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
is there any api limit?
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
or I have to do vanilla way?
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
ahh cool I will start implementing and experience it myself. Is there any library which will make implementing maplibre with solid easier?
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
Basically I want to be able to display roads and terrain normally, I want 2 user to be able to share their current location which will update per some seconds, also I want to add icons on the map and I want o have only one country. will MapLibre be helpful in this case?
23 replies
SSolidJS
Created by Luka on 12/28/2024 in #support
How to make a map?
I will consider it
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
I did fix the error but I got different error now: Error when evaluating SSR module /home/lukachikvaidze/projects/sheuketee/src/routes/(Landing).jsx?pick=default&pick=$css: |- Error: undefined does not match field "params": [Pattern] of type FunctionExpression This I think should be either configs or the way I am fetching data I haven't been looking in docs for some time just saw that cache function has been deprecated and some other functions are keep coming. createAsync that I had written was working perfectly around 2 days ago so here is what I got for now "use server" import { query } from "@solidjs/router"; import { verify_user } from "./session_management"; import { getRequestEvent } from "solid-js/web"; export const header = query(async () => { try { const event = getRequestEvent(); const session = await verify_user(event); if (session === 401) { throw new Error(401); } return { profId: session.profId, role: session.role, }; } catch (error) { if (error.message === "401") { return 401; } console.log("GET USER", error); } }, "user-ident"); import { header } from "~/routes/api/header"; const user = createAsync(() => header()); I might not be using best practices here but I just want to know if fetching is correct
23 replies
SSolidJS
Created by Md. Golam Kibria Raihan on 12/11/2024 in #support
Can't start solid start project
What worked?
8 replies
SSolidJS
Created by Md. Golam Kibria Raihan on 12/11/2024 in #support
Can't start solid start project
I have the same problem did you find a solution?
8 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
So far What i did is I cloned current code from github and completely wiped most of the code just left a hello world page modified versions in it as well but it didn't work, also tried just creating solidstart template i did install everything but npm run dev and I still get the same error there might be more recent approach to creating solidstart template so I will include what I did so I just ran npm init solid@latest then npm install and then npm run dev which as I said yield the same error. So now I am thinking my PC has some package problems since I have debian I maybe messed something up.
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
So the landing page the localhost:3000 that I have only Header.jsx makes request to the Header.js file which might have some problems but its not only the landing localhost:3000 page that throws the error all the routes that I have behave same, is there anything wrong with configs? It might be versions complicating with each other as well right?
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
I cleared the whole Xelosani.jsx file and only left the hello world template kind of thing but it didnt work
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
I suspect that /src/routes/xelosani/[id]/(Xelosani).jsx should have the problem
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
I had something similar bug back then and it was really small import problem it took me so long to figure out back then I will check imports as well
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
Ok I will go through it and kind of blank out some parts of the code
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
@Erik Demaine Actually if you could give me some more advise about it, it would mean a lot especially on SSR I am new to it.
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
@Erik Demaine Here is the code https://github.com/7Luke7/sheuketee/tree/main
23 replies
SSolidJS
Created by Luka on 12/11/2024 in #support
[h3] [unhandled] H3Error: Client-only API called on the server side. Run client-only code in onMount
Actually around a month ago the code was working fine I had some stuff going on so couldn't continue writing code for this project. Did I miss some crucial updates? idk, I would be glad if someone could clue me.
23 replies
SSolidJS
Created by Luka on 11/9/2024 in #support
Suspense and dealing with large data
When I am using deferStream true it doesnt show the suspense fallbacks but as soon as I set it to false the fallbacks work well. Is it because of deferStream that suspenses dont work in my case? deferStream should be waiting for all the data until rendering the suspense so it kind of skips it I guess correct me if I am wrong. But if this is the case how can I have loading with the deferStream: true? I want to keep deferstream because of SSR. I might be completely wrong about how these work I am new to SSR and solid as well ) So here is how I fetch the data now I changed it to multiple request so I could use multiple suspenses I guess const user = createAsync(async () => { const [userData, userSkills] = await Promise.all([ get_xelosani(props.params.id), get_skills(props.params.id) ]); return { userData, userSkills }; }, { deferStream: true }); I kind of pass down data to another component like this <ProfileRight user={user} setEditingServiceTarget={setEditingServiceTarget} setModal={setModal} /> <Suspense fallback={ <p>Loading...</p> } > <p class="text-xs font-[thin-font] font-bold"> შემოუერთდა {props.user()?.userData?.creationDateDisplayable} </p> </Suspense> <section class="w-full flex"> <Suspense fallback={<div> Loading... </div>}> <SkillCarousel skills={props.user()?.userSkills?.skills}></SkillCarousel> </Suspense> </section>
5 replies