#Internal server error

32 messages · Page 1 of 1 (latest)

jade thicket
#

When i try to access my website i get the image below. I also get no logs from the pnpm start command. Is there a way to enable logs for the app so i can see why i get the error?

celest hollowBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

hidden cobalt
jade thicket
#

Ok sorry for not answering but i fixed it, i accidentally removed the compilerOptions.declaration option in my tsconfig which made typescript error, but now i get this error

Type error: The inferred type of 'alertVariants' cannot be named without a reference to '.pnpm/[email protected]/node_modules/class-variance-authority/types'. This is likely not portable. A type annotation is necessary.
39.28 
39.28   4 | import { cn } from "../../lib/utils";
39.28   5 |
39.28 > 6 | const alertVariants = cva(
39.28     |       ^
39.28   7 |   "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
39.28   8 |   {
39.28   9 |     variants: {
39.46  ELIFECYCLE  Command failed with exit code 1.
------
failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
hidden cobalt
jade thicket
#

Ok full context im running this in a docker container and it seems the wierd typescript error comes from running pnpm dlx prisma generate as it does not occur when i remove the second line here

RUN rm -rf node_modules && pnpm i
RUN pnpm dlx prisma generate
RUN pnpm run build
hidden cobalt
#

oh no, you don't need rm -rf node_modules && pnpm install if you are using docker

jade thicket
#

I know i felt it was wierd but still my prisma generate is making my pnpm node modules invalid somehow

#

Could it be removing symlinks or something similar?

hidden cobalt
jade thicket
#

yes i've done docker-compose down -v && docker-compose build --no-cache and it still gives the cva error

hidden cobalt
#

how many image do you see?

jade thicket
#

7 disregarding mysql and one where the repository isn't <none>

hidden cobalt
jade thicket
#

im sorry for my bad explination heres the docker image ls

#

auth-prod is my project

hidden cobalt
#

then try to build it again

jade thicket
hidden cobalt
hidden cobalt
jade thicket
#
{
  "include": [
    "next-env.d.ts",
    "next.config.js",
    "**/*.js",
    "**/*.ts",
    "**/*.tsx",
    ".next/types/**/*.ts"
  ],
  "exclude": ["node_modules"],
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Next.js",
  "compilerOptions": {
    "plugins": [{ "name": "next" }],
    "allowJs": true,
    "jsx": "preserve",
    "noEmit": true,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "incremental": false,
    "isolatedModules": true,
    "lib": ["es2022", "DOM", "DOM.Iterable"],
    "module": "NodeNext",
    "moduleDetection": "force",
    "moduleResolution": "NodeNext",
    "noUncheckedIndexedAccess": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "ES2022"
  }
}
#

turning off declarations fixed the types issue but then in turn gives me the internal server error in nextjs during runtime

hidden cobalt
#

maybe try pnpm store prune

#

and pnpm install again

#

then pnpm build && pnpm start

jade thicket
#

nope

#

would it be better to just migrate to yarn, seems like a symlink issue with pnpm

#

Don't think this is worth the hassle

hidden cobalt