Questions tagged [blitz.js]

17 questions
3
votes
4 answers

Vercel build error that doesn't happen locally

As the title says, I have a web app that build and runs fine locally, but gives me a weird error when I build with Vercel (cli or the website). Here's what it normally (and should) look like for reference. yarn run v1.22.19 warning ../package.json:…
3
votes
1 answer

How to update the password of a Supabase user on a NextJs project?

I'm facing an issue updating a password for a supabase user on a BlitzJs (NextJs) project. Basically, I have a reset password method that works perfectly. First I send an email with a reset link, that opens a page where the user can update his…
Manu
  • 372
  • 2
  • 12
2
votes
1 answer

Writing Blitz js middleware to return plain text for a url endpoint

I have a Next.js app I am trying to migrate to Blitz.js. It's a programming related site and some of the site's routes are intended to let the user run a script with something like cURL or wget piped through their shell interpreter. These routes…
Sir Robert
  • 4,686
  • 7
  • 41
  • 57
2
votes
1 answer

TypeScript: Property 'data' does not exist on type '{ children?: ReactNode; }'. ts(2339)

Question I'm working on a small project with BlitzJS. I'm fetching some data but I keep getting this Typescript issue: Property 'data' does not exist on type '{ children?: ReactNode; }'.ts(2339) import { BlitzPage } from "blitz" import Layout from…
2
votes
0 answers

Issue when installing blitzjs and ionic togther, related to es6-module

When I try to install blitzjs and ionic together, it fails. It is quite easy to reproduce the issue. npm install -g blitz blitz new blitz-ionic ✔ Pick a new project's language · JavaScript ✔ Pick your new app template · full ✔ Install dependencies?…
Oli
  • 15,935
  • 7
  • 50
  • 66
2
votes
0 answers

blitz.js: ctx.session is undefined in login mutation on deployment (works locally)

In app/auth/mutations/login the ctx is an empty object ({}), thus this line: await ctx.session.$create({ userId: user.id, role: user.role as Role }); trhows an Error: Cannot read property '$create' of undefined. Only happens on vercel deployment,…
eagor
  • 9,150
  • 8
  • 47
  • 50
1
vote
3 answers

React function executes continuously and state keeps refreshing

I have kind of a weird issue in React. I am using the Blitz JS framework along side with Prisma for database stuff. I have a function that queries the database for all entries from a date the user selects forward. It's used for a reservation system…
0
votes
1 answer

using of queries correctly with BlitzJS?

I'm trying to retrieve data from a table by filtering on the relationship with the Blitzjs framework, but I can't do it using queries, even though it's the only way. When I call the query in my component, I get an error that I can't solve myself //…
0
votes
1 answer

When building blitjs project I get the following error: "Type error: ',' expected on ...'"

I'm using the Blitjs framework. I have installed a custom package I have created (@devqaly/browser) When building the project (blitz build) I get the following error: $ blitz build Loaded env from…
Bruno Francisco
  • 3,841
  • 4
  • 31
  • 61
0
votes
0 answers

React Blitz.js 3rd party auth failing with passport-azure-ad

I'm attempting to swap the default auth scheme in Blitz.js with a passport-azure-ad scheme, using the OIDCStrategy. I'm getting an error that I'm not sure about and would appreciate any help! I've created a new file under src/pages/auth/openid.tsx…
user8565662
  • 127
  • 1
  • 1
  • 6
0
votes
0 answers

Serving static html pages on amplify

I have a static website using BlitzJS (Similar to NextJS) My build directory is "dist" and I have another folder "public" that contains static html page called start.html. The issue is, when I try to open the static page inside the public page it…
Peril
  • 1,569
  • 6
  • 25
  • 42
0
votes
1 answer

Is there a way to use ctx.session.$create in api using Blitz.js

I am trying to use blitz.js login API in a Flutter project. So I have created a /api/auth/login.ts file with the following code import { getAntiCSRFToken, getSession, SecurePassword } from "@blitzjs/auth" import { authenticateUser } from…
0
votes
1 answer

Permission error at WSL2 files mounted into Docker container

I want to make a development setup of a Blitz.js app with Docker (because it will be deployed and tested with it, too). I am developing on Windows, the code resides within WSL2. After starting up, the container exits with: ready - started server on…
lunjius
  • 418
  • 3
  • 12
0
votes
1 answer

blitzjs form renders initial values while waiting for update mutation

I am using a form (react-final-form) that is by and large generated by blitzjs. Here are the relevant parts: const [updateEventMutation] = useMutation(updateEvent) ... router.push(Routes.ShowEventPage({ eventId: event.id…
mab
  • 760
  • 4
  • 18
0
votes
1 answer

How to filter a list in react-admin with a parameter that is fetched asynchronously?

I am trying to filter a list in react-admin. Basically, I have a list of classes, that I want to filter by teacherId. However, the teacherId has to be fetched asynchronously. The code looks like this: const activitiesFilters = [
Manu
  • 372
  • 2
  • 12
1
2