Closed holahoon closed 3 months ago
I previously used 7.0.2 version, then updated to 7.2.0 to see if it solves, but no luck
next-safe-action v7 works with Next.js 14 too. I mistakenly exported useStateAction
hook from /hooks
path in v7.2.0, while it should only be exported from /stateful-hooks
path. v7.2.1 should fix this build issue, please let me know.
Hmm, well, it seems like it Next.js requires React >= 19.0.0 when updating the Next.js version to 14.3.0-canary.40
which I don't want to use 19 yet 🤔
Can't you use Next 14.2.5?
https://github.com/TheEdoRan/next-safe-action/releases/tag/v7.2.1 fixed it. Thanks!
Can't you use Next 14.2.5?
Yeah, I def can. I just thought I had to upgrade to 14.3.0-canary.40
which requires react >=19.
Are you using the latest version of this library?
Is there an existing issue for this?
Describe the bug
When building next.js, it fails to compile with error:
Reproduction steps
I deleted
pnpm-lock.yaml
andnode_modules
folders to clean install the package again. Ranpnpm install
to install all of my dependencies and ranpnpm next run build
to build the code. All of a sudden, build fails which wasn't failing before. Am I using a wrong version?Expected behavior
Expected the build to compile, but fails with
Attempted import error: 'useActionState' is not exported from 'react' (imported as 'React').
Minimal reproduction example
private repo
Operating System
mac OS M2
Library version
7.2.0
Next.js version
14.2.4
Additional context
No response