Skip to content
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

'react-focus-lock' is deprecated #8454

Open
1 of 3 tasks
yburshe opened this issue Apr 22, 2024 · 3 comments
Open
1 of 3 tasks

'react-focus-lock' is deprecated #8454

yburshe opened this issue Apr 22, 2024 · 3 comments

Comments

@yburshe
Copy link

yburshe commented Apr 22, 2024

Description

When I install the required npm packages

npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion

and then import ChakraProvider in App.js in my React app, I get the error

Module not found: Error: Can't resolve './Combination' in '/Users/yashburshe/Developer/food-allergy-app/node_modules/react-focus-lock/dist/es2015'
Did you mean 'Combination.js'?

Module not found: Error: Can't resolve './UI' in '/Users/yashburshe/Developer/food-allergy-app/client/node_modules/react-focus-lock/dist/es2015'
Did you mean 'UI.js'?

Npm warn exists as well

npm WARN deprecated react-focus-lock@2.12.0: incorrect ESM implementation

Link to Reproduction

https://codesandbox.io/p/sandbox/chakra-ui-javascript-lzzg9?file=%2Fsrc%2Findex.js

Steps to reproduce

  1. Create-react-app
  2. Npm install chakra-ui, emotion/react, emotion/styled, framer motion
  3. Import ChakraProvider in App.js
  4. Wrap ChakraProvider around everything (in my case, my own AuthProvider and inside that BrowserRouter)
  5. Error occurs Module not found: Error: Can't resolve './Combination' in '/Users/yashburshe/Developer/food-allergy-app/node_modules/react-focus-lock/dist/es2015' Did you mean 'Combination.js'?

Chakra UI Version

2.8.2

Browser

Safari 17.4.1

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

@yburshe yburshe changed the title 'react-focus-lock is deprecated 'react-focus-lock' is deprecated Apr 22, 2024
@st3fus
Copy link

st3fus commented Apr 22, 2024

Having the same exact issue. It breaks in build, but when the build is ran locally it doesn't break. Only in production

@prasad-kumkar
Copy link

prasad-kumkar commented Apr 23, 2024

Hope this helps: #8451 (comment)

@st3fus
Copy link

st3fus commented Apr 23, 2024

This helped me: react-focus-lock@2.12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants