#Internal server error
32 messages · Page 1 of 1 (latest)
🔎 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)
what happen if you try to visit one or the route?
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
try rm -rf node_modules && pnpm install
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
oh no, you don't need rm -rf node_modules && pnpm install if you are using docker
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?
have you tried remove the docker image and build again?
yes i've done docker-compose down -v && docker-compose build --no-cache and it still gives the cva error
run docker image ls
how many image do you see?
7 disregarding mysql and one where the repository isn't <none>
7 related to your next app?
docker rmi 24 fb 14 76 e9 c6 3a
then try to build it again
nope
try npm run build first
could you show your tsconfig.json?
{
"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
I don't have issue with declaration set to true or false
maybe try pnpm store prune
and pnpm install again
then pnpm build && pnpm start
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
you could try