Closed muezz closed 4 months ago
This is due to the TypeSchema library incompatibility with TypeScript >= 5.5. Installing the experimental version of next-safe-action should solve your issue, as explained here:
Additionally, even if you're not required to do this, if you're using VS Code, I also suggest to add this configuration in .vscode/settings.json, to tell the editor that you want to use the actual project TS version, instead of the default one that comes with it:
{
"typescript.tsdk": "node_modules/typescript/lib"
}
Let me know if this fixes your issue, thanks.
@TheEdoRan I have added this in my settings file and I am still seeing this same issue when I try to build.
@TheEdoRan I have also tried the build command after installing the experimental version and I still have this issue.
Before writing my comment I did those steps and actually solve the build issue with your reproduction repo, so this is very weird. Can you please push the changes you've made to GitHub so I can take a look to the updated code? Thanks.
@TheEdoRan I tried a few things and after deleting .next
, node_modules
and pnpm-lock.yaml
and running pnpm i
, the project built fine.
So I think your solution was correct although I hope I will be able to move back to the stable version soon.
Great! By the way, experimental
shares the same code as the stable version, the only difference is that it supports just Zod. Unfortunately TypeSchema is still incompatible with TS 5.5, I hope this will be solved soon too, but I'll merge any changes to main
in the experimental
branch in the meantime.
Are you using the latest version of this library?
Is there an existing issue for this?
Describe the bug
When I try to run
pnpm run build
I get the following error:Reproduction steps
pnpm run build
Expected behavior
The provided repo has a sign-in dialog component. These is no error in the file but this linting error only appears on build.
Minimal reproduction example
https://github.com/muezz/nsf-bug-report.git
Operating System
macOS Sonoma
Library version
7.1.3
Next.js version
14.2.4
Additional context
No response