-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility Issue with react-focus-lock in Next.js Projects #8451
Comments
i suggest the development team to pine |
For the ones who can’t wait for a solution, I've override the version v2.12.0 by the 2.11.3 mentioned by @izinin in order to fix my build script, this is my temporary workaround: your package.json:
and reinstall your node_modules:
VSCode description for overrides: Overrides is used to support selective version overrides using npm, which lets you define custom package versions or ranges inside your dependencies. For yarn, use resolutions instead. See: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides |
@jomorais : thank you very much for your help. it is working! |
thanks @jomorais and @prasad-kumkar ,
|
Description
I'm encountering an "ERR_MODULE_NOT_FOUND" error in my Next.js project when using a component from @chakra-ui@2.8.2 or later that seems to rely on react-focus-lock. The specific error message is:
Link to Reproduction
https://codesandbox.io/p/github/Reax-Finance/app/main
Steps to reproduce
@chakra-ui/react: 2.8.2 (and potentially in later versions)
react-focus-lock: Introduced by Chakra UI dependency.
next: 13.1.3
node: 20.x.x
Possible Cause:
I suspect a change introduced in @chakra-ui/react@2.8.2 and onwards might create a compatibility issue regarding module resolution of the react-focus-lock library, specifically with how Next.js handles module imports.
Chakra UI Version
2.8.2
Browser
No response
Operating System
Additional Information
Could you please investigate whether there is a fix or workaround for this issue? It would be greatly appreciated if Chakra UI could be made fully compatible with the latest versions of react-focus-lock for smoother development experiences with Next.js.
The text was updated successfully, but these errors were encountered: