profile
viewpoint
Simon Knott Skn0tt @quirrel-dev Potsdam simonknott.de Currently working on Quirrel. Creator of EntE. Open Sourcerer, studying IT Systems Engineering at Hasso Plattner Institute.

blitz-js/blitz 5485

⚡️The Fullstack React Framework — built on Next.js

emmabostian/developer-portfolios 1757

A list of developer portfolios for your inspiration

blitz-js/superjson 325

Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.

quirrel-dev/quirrel 93

The Task Queueing Solution for Serverless.

blitz-js/babel-plugin-superjson-next 13

Automatically transform your Next.js Pages to use SuperJSON

quirrel-dev/owl 12

A high-performance, Redis-backed job queueing library originally built for Quirrel. Has an in-memory mode for development use cases.

Skn0tt/alex-browser-extension 12

Catch insensitive, inconsiderate writing in your browser.

Castleyyyyy/LoveLetters 3

Because lonely programmers need some love in their life

Eluminati/Game 3

An Adventure-RTS-MMORPG distributed browser game with procedural generation and AI

quirrel-dev/demo.quirrel.dev 2

The Quirrel Landing Page

startedSkn0tt/nextjs-nestjs-integration-example

started time in 4 hours

issue commentblitz-js/blitz

dev build fails randomly

@sakulstra Thanks for taking it up!

i can only solve by saving the file once again.

What does this mean?

sakulstra

comment created time in 8 hours

created repositoryPaulpanther/Miisery

created time in 10 hours

startedformium/tsdx

started time in 11 hours

issue commentblitz-js/blitz

DB Studio error on new project

FYI if anyone happens to see this bug see the issue over on the Prisma Studio repo: https://github.com/prisma/studio/issues/586

johnslemmer

comment created time in 15 hours

PR opened blitz-js/blitz

Reviewers
Add missing dependencies to `config` and `display` packages

Closes: #1556

What are the changes and their implications?

This PR adds missing required dependencies for @blitzjs/config and @blitzjs/display packages. Therefore fixes the problem with modules not found when installing recipes.

Checklist

  • [ ] <s>Tests added for changes</s>
  • [ ] <s>PR submitted to blitzjs.com for any user facing changes</s>

<!-- IMPORTANT: Make sure to check the "Allow edits from maintainers" box below this window -->

+5 -0

0 comment

2 changed files

pr created time in 15 hours

fork rishi8094/swr-site

The official website for SWR.

https://swr.vercel.app

fork in 16 hours

fork rishi8094/nextra

The Next Static Site Generator

https://nextra.vercel.app

fork in 17 hours

startedhttpie/httpie

started time in a day

fork hendraet/LabShare

Django Tool that helps everyone to get their fair share of GPU time

fork in a day

issue openedblitz-js/blitz

Error: Trying to use Blitz's useQuery to fetch 3rd party, when its not.

What is the problem?

Post upgrade to v0.26.0, one of my mutation functions, which was working previously, is now giving the error Error: It looks like you are trying to use Blitz's useQuery to fetch from third-party APIs. To do that, import useQuery directly from "react-query".

While reviewing the source files, I noticed that the code that validates the mutation func, actually looks for whether the mutation func is isEnhancedResolveRpcClient & whether process.env has JEST_WORKER_ID & Blitz_Test_Environment defined. I am a bit confused by this. Why is Jest used to check whether Jest is setup and being used? and what is RPC client.

And my main question is, how can I resolve this and get this func to pass. All other mutation funcs are working as before, except for this one.

The function is as such:

const saveUserFeedback = async (
  userFeedbackType,
  ctx: { session?: SessionContext } = {}
) => {
  try {
  ctx.session?.authorize();
  const { userId } = ctx.session!;

  const { feedbackType, message, response, pageRef } = userFeedbackType;
  return await db.feedback.create({
    data: {
      message,
      about: feedbackType,
      requireResponse: response,
      pageRef,
      user: {
        connect: {
          id: userId!,
        },
      },
    },
  });
  } catch (err) {
    throw err;
  }
};

It is consumed within React component as:

const [saveFeedbackMutation] = useMutation(saveFeedback);

Versions

debug: blitzPkgPath: /home/sk/www/aim-high/node_modules/blitz/dist/index.js
debug: cliPkgPath: /home/sk/www/aim-high/node_modules/blitz/node_modules/@blitzjs/cli/lib/src/index.js 

Linux 4.15 | linux-x64 | Node: v12.18.3

blitz: 0.26.0 (global)
blitz: 0.26.0 (local)

  Package manager: npm 
  System:
    OS: Linux 4.15 Linux Mint 19.2 (Tina)
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
    Memory: 5.45 GB / 15.68 GB
    Shell: 5.4.2 - /usr/bin/zsh
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    Yarn: Not Found
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/cli: 2.x => 2.12.0 
    @prisma/client: 2.x => 2.12.0 
    blitz: 0.26.0 => 0.26.0 
    react: 0.0.0-experimental-4ead6b530 => 0.0.0-experimental-4ead6b530 
    react-dom: 0.0.0-experimental-4ead6b530 => 0.0.0-experimental-4ead6b530 
    typescript: 4.x => 4.1.2 

Other

Error log:

Uncaught Error: It looks like you are trying to use Blitz's useQuery to fetch from third-party APIs. To do that, import useQuery directly from "react-query"
    validateQueryFn core.esm.js:541
    sanitize core.esm.js:550
    useMutation core.esm.js:1424
    ContactForm ContactForm.tsx:15
    ....

created time in a day

issue commentblitz-js/blitz

Automatic Cache Invalidation

👋 I'm far from an expert but I've been reading through the docs and wondering how to do this myself. What about passing in a query to the useMotation hook and that query gets invalidated once a mutation has succeeded?

flybayer

comment created time in a day

pull request commentblitz-js/blitz

Update Emotion recipe to v11

Size Change: 0 B

Total Size: 195 kB

<details><summary>ℹ️ <strong>View Unchanged</strong></summary>

Filename Size Change
packages/blitz/dist/cli.js 15.7 kB 0 B
packages/blitz/dist/index.js 245 B 0 B
packages/config/dist/config.cjs.development.js 1.35 kB 0 B
packages/config/dist/config.cjs.production.min.js 917 B 0 B
packages/config/dist/config.esm.js 1.28 kB 0 B
packages/config/dist/index.js 143 B 0 B
packages/core/dist/core.cjs.development.js 12.9 kB 0 B
packages/core/dist/core.cjs.production.min.js 6.98 kB 0 B
packages/core/dist/core.esm.js 12.5 kB 0 B
packages/core/dist/index.js 141 B 0 B
packages/display/dist/display.cjs.development.js 1.84 kB 0 B
packages/display/dist/display.cjs.production.min.js 1.08 kB 0 B
packages/display/dist/display.esm.js 1.76 kB 0 B
packages/display/dist/index.js 144 B 0 B
packages/file-pipeline/dist/file-pipeline.cjs.development.js 6 kB 0 B
packages/file-pipeline/dist/file-pipeline.cjs.production.min.js 3.07 kB 0 B
packages/file-pipeline/dist/file-pipeline.esm.js 5.87 kB 0 B
packages/file-pipeline/dist/index.js 147 B 0 B
packages/generator/dist/generator.cjs.development.js 15.6 kB 0 B
packages/generator/dist/generator.cjs.production.min.js 9.47 kB 0 B
packages/generator/dist/generator.esm.js 15.3 kB 0 B
packages/generator/dist/index.js 145 B 0 B
packages/generator/dist/templates/app/babel.config.js 77 B 0 B
packages/generator/dist/templates/app/blitz.config.js 324 B 0 B
packages/generator/dist/templates/app/jest.config.js 682 B 0 B
packages/generator/dist/templates/app/test/__mocks__/fileMock.js 54 B 0 B
packages/installer/dist/index.js 145 B 0 B
packages/installer/dist/installer.cjs.development.js 7.69 kB 0 B
packages/installer/dist/installer.cjs.production.min.js 5.14 kB 0 B
packages/installer/dist/installer.esm.js 7.54 kB 0 B
packages/repl/dist/index.js 141 B 0 B
packages/repl/dist/repl.cjs.development.js 1.81 kB 0 B
packages/repl/dist/repl.cjs.production.min.js 1.08 kB 0 B
packages/repl/dist/repl.esm.js 1.69 kB 0 B
packages/server/dist/index.js 142 B 0 B
packages/server/dist/server.cjs.development.js 21.8 kB 0 B
packages/server/dist/server.cjs.production.min.js 12.5 kB 0 B
packages/server/dist/server.esm.js 21.9 kB 0 B

</details>

<a href="https://github.com/preactjs/compressed-size-action"><sub>compressed-size-action</sub></a>

wKovacs64

comment created time in a day

PR opened blitz-js/blitz

Reviewers
Update Emotion recipe to v11

What are the changes and their implications?

Updates the Emotion recipe to use Emotion v11.

Checklist

  • ~[ ] Tests added for changes~
  • ~[ ] PR submitted to blitzjs.com for any user facing changes~

<!-- IMPORTANT: Make sure to check the "Allow edits from maintainers" box below this window -->

+61 -172

0 comment

2 changed files

pr created time in a day

create barnchblitz-js/blitz

branch : justin/emotion-11-recipe

created branch time in a day

issue commentblitz-js/blitz

Blitz install recipe not working

Same problem.

johnslemmer

comment created time in a day

startedshuding/nextra

started time in 2 days

startedpbteja1998/nextjs-starter

started time in 2 days

startedLINBIT/linstor-server

started time in 2 days

issue commentblitz-js/blitz

Feature request: Stripe Recipe

Hey Folks, I have working example using Blitz and Stripe checkout/portal. I don' think that a recipe will be a good choice here because it will introduce a lot of files and people can do this differently. However I will happy to add a simple example to the repo. If that's ok with you I can do ion the upcoming days

needcaffeine

comment created time in 2 days

pull request commentblitz-js/blitz

fix(generator): change file path to kebab-case

I am getting this error The job running on runner GitHub Actions 7 has exceeded the maximum execution time of 360 minutes.

Khaledgarbaya

comment created time in 2 days

push eventEluminati/Game

René Baumgärtner

commit sha ec8da27ae3ae2debc057fe91667fb8490a7da39d

update dependencies

view details

push time in 2 days

push eventEluminati/Game

René Baumgärtner

commit sha 9f872742ee7182a539f02e44dbd17cae1dabc400

update dependencies

view details

push time in 2 days

startedlukejacksonn/monacode

started time in 2 days

issue commentblitz-js/blitz

Module not found: Can't resolve 'fs'

I removed the the fs-part to a API-Route and now it is working.

vonphlpp

comment created time in 2 days

issue openedblitz-js/blitz

Module not found: Can't resolve 'fs'

I have on a page a mutation. If I go to the page (not using the mutation) I get the error, just by visiting the page. Module not found: Can't resolve 'fs'

import { Ctx } from "blitz"
import db, { Prisma } from "db"

var fs = require("fs")

type DeleteFileInput = Pick<Prisma.FileDeleteArgs, "where">

export default async function deleteFile({ where }: DeleteFileInput, ctx: Ctx) {
  ctx.session.authorize()

  const pathDelete = `../../../public${where.src}`

  fs.stat(pathDelete, function (err, _stats) {
    if (err) {
      return console.error(err)
    }

    fs.unlink(pathDelete, function (err) {
      if (err) return console.log(err)
      console.log("file deleted successfully")
    })
  })

  await db.file.delete({ where })

  return true
}

I'm using "blitz": "0.26.2", in "blitz": "0.25.0", I hade the same mutation without any problems.

created time in 2 days

startedsnipe/snipe-it

started time in 2 days

issue commentblitz-js/blitz

Completely silent logs

Thanks!

kitze

comment created time in 2 days

fork T4rikA/1327

CMS for a student representatives website

fork in 2 days

starteddrathier/stack-overflow-import

started time in 2 days

more