Questions tagged [qwik]

98 questions
1
vote
2 answers

How can I access file system inside Qwik Endpoints?

I'm trying to create an Endpoint in Qwik that needs to access file system. I intend to use Node.js fs for this purpose. Here's what I wrote: import fs from 'fs' And I get this error: (node:248) Warning: To load an ES module, set "type": "module" in…
Ali EXE
  • 853
  • 1
  • 7
  • 21
1
vote
2 answers

Hashing Passwords with Vercel-Edge Adapter in Qwik City

I have the following code, which uses the argon2-browser package to hash the user's password in a server function: export const authSignup = server$(async function ( firstName: string, lastName: string, email: string, password: string, …
PiWizard3852
  • 95
  • 1
  • 11
1
vote
2 answers

What's wrong with this Qwik routeAction code?

Here is my routeAction where I've the code for creating a user account. I'm using appwrite for this. export const useCreateUserAccount = routeAction$( async (user, { fail }) => { try { const result = await account.create( …
Suresh
  • 5,687
  • 12
  • 51
  • 80
1
vote
1 answer

How does "qwik-react" convert a React component to a Qwik component?

How does "qwik-react" convert a React component to a Qwik component? Does it simply make it compatible with Qwik or does it transform it into a true Qwik component? Is there any advantage for developers to build Qwik components and libraries? For…
Komeil Mehranfar
  • 45
  • 1
  • 2
  • 13
1
vote
1 answer

Getting 500 error when deploying frontend with Directus client on Vercel and Cloudflare Pages

I have a Directus instance (backend) hosted on a heroku dyno that is working fine. I have a custom frontend developed with Qwik city. Everything is working fine locally (dev and build), but when I try to deploy it either on Cloudflare pages or…
Aurélien B.
  • 498
  • 2
  • 9
1
vote
0 answers

How to get the previous value for a qwik signal?

I have some expensive calculations performed when user switches from mobile to desktop resolution, so I need to track changes between resolutions and execute calculations only when breakpoint is changed. component$(() => { const isMobile =…
1
vote
1 answer

How to make an offline PWA with Qwik Framework?

This is what I get when I disable my PWA connection. I'm breaking my head trying to get my PWA developed with Qwik framework to work offline. I've read the documentation, looked for examples, tried Vite-PWA and a manual service-worker registration…
1
vote
2 answers

How to add a record to a database using Qwik and Prisma?

You have to define a loader in the index.tsx file, outside of the component and export it: export const useAddProduct = routeLoader$(async () => { return await prisma.products.create({ data: { name: 'Steel Table', description: 'A…
Guenther
  • 403
  • 2
  • 16
1
vote
1 answer

How to extend callback QRL in child component in Qwik JS?

In Qwik JS I am trying to create a modal that closes when Esc is pressed. The modal needs to be accessible from anywhere, so I put it in layout.tsx. layout.tsx import {component$, Slot, useStore} from '@builder.io/qwik'; import Header from…
minitauros
  • 1,920
  • 18
  • 20
1
vote
4 answers

Custom Login Page in Qwik with Qwik-auth plugin

Qwik has a built in plugin for AuthJS called qwik auth (which as far as I am aware is undocumented). I’m not having any issue with it except that I want a custom login page (I want my form to authenticate the user instead of the default ugly form on…
PiWizard3852
  • 95
  • 1
  • 11
1
vote
1 answer

Chart.js and QWIK integration

Did anyone have an idea or know how to implement chart.js in qwik without having to convert it with react and @qwikify ? I need to implement a component that has a donut chart.js built in it, unfortunately i can not figure out how to make it work,…
FG99
  • 11
  • 1
1
vote
1 answer

EBADF in npm create qwik

I'm trying to start a new Qwik app but when I put "npm create qwik@latest" I get this error: TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor) I searching to solve it but there's no way. I apreciated if someone could give…
1
vote
1 answer

How to access request data in layouts and pages in Qwik City

I'm creating an application Qwik and Qwik City. I want to show something in my layout, only if it's the home page. This is my layout.jsx: const Layout = component$((props) => { // console.log(props); // I don't see anything related to request …
1
vote
2 answers

How to return 404 in Qwik onGet?

I'm using Qwik, and I want to return 404 when from my onGet method. Unfortunately the docs does not include an example regarding this. And I can't find anything through Google search. Basically I want to do this: const onGet = async({ params, url })…
1
vote
1 answer

Vite error when defining a component in an object: Cannot read properties of undefined

I have a list of options in a React component which I am mapping through to make some UI. The component is being used in QwikJS, which supports React components and uses Vite. However, when I add an icon value in my list of options Vite breaks…
Ray Purchase
  • 681
  • 1
  • 11
  • 37