AlexAnarcho
AlexAnarcho
TTCTheo's Typesafe Cult
Created by AlexAnarcho on 7/8/2024 in #questions
trpc server actions: experimental_nextAppDirCaller
So, I saw this in one of the recent videos that you t3 rockstars are doing gods work and adding server actions to trpc: https://trpc.io/blog/trpc-actions So, I am trying to implement this, but am constantly running into issues. Would be LOVELY to get a video from Theo explaining the best way to use t3-stack with server actions and shadcn forms. Like the happy path. Maybe its just not finished baking, so i m premature in my question here. But if anybody got trpc working with server actions let me know.
3 replies
TTCTheo's Typesafe Cult
Created by AlexAnarcho on 11/24/2023 in #questions
Flake.nix for create t3-app and nextjs14
Hey there, so I wanted to upgrade my t3-app from next13 to next14. I followed the usual upgrade procedure and then wanted to start my dev server with yarn dev - however, I got the error that:
class NextRequest extends Request {
^

ReferenceError: Request is not defined
class NextRequest extends Request {
^

ReferenceError: Request is not defined
- found this thread https://github.com/vercel/next.js/issues/57214, but after trying all kinds of different node versions, yarn versions and even bun - i still get this error. in the github issue, they talk about node 16, which i have not installed at all. here i my flake.nix for the dev shell
{
description = "T3 Stack with Monero Flake";

inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };

outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.x86_64-linux.default = with pkgs;
mkShell {

packages = [
bun
nodePackages.prettier
nodePackages.eslint
nodePackages.typescript

nodePackages.prisma
prisma-engines
monero-cli
openssl

];
nativeBuildInputs = [

bashInteractive

];
shellHook = ''
export BROWSER=none
export NODE_OPTIONS="--no-experimental-fetch"
export PRISMA_QUERY_ENGINE_BINARY="${prisma-engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${prisma-engines}/lib/libquery_engine.node"
export PRISMA_INTROSPECTION_ENGINE_BINARY="${prisma-engines}/bin/introspection-engine"
export PRISMA_FMT_BINARY="${prisma-engines}/bin/prisma-fmt"
export PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING="true"
node -v
'';
};
};
}
{
description = "T3 Stack with Monero Flake";

inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };

outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.x86_64-linux.default = with pkgs;
mkShell {

packages = [
bun
nodePackages.prettier
nodePackages.eslint
nodePackages.typescript

nodePackages.prisma
prisma-engines
monero-cli
openssl

];
nativeBuildInputs = [

bashInteractive

];
shellHook = ''
export BROWSER=none
export NODE_OPTIONS="--no-experimental-fetch"
export PRISMA_QUERY_ENGINE_BINARY="${prisma-engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${prisma-engines}/lib/libquery_engine.node"
export PRISMA_INTROSPECTION_ENGINE_BINARY="${prisma-engines}/bin/introspection-engine"
export PRISMA_FMT_BINARY="${prisma-engines}/bin/prisma-fmt"
export PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING="true"
node -v
'';
};
};
}
is anybody else using nix for a devshell? and has a working flake or shell.nix for nextjs14? When i downgrade to next13 in package json it all works... 😦
3 replies