react-datocms
react-datocms copied to clipboard
Unable to resolve module @mux/mux-player-react/lazy after updating react-datocms to version 7.0.1 in React Native project
Description:
Hello,
I've recently updated the react-datocms
library in my React Native project from version 3.0.8 to 7.0.1. After the update, the project crashes on startup with the following error:
error: Error: Unable to resolve module @mux/mux-player-react/lazy from PROJECT_PATH/node_modules/react-datocms/dist/cjs/VideoPlayer/index.js: @mux/mux-player-react/lazy could not be found within the project or in these directories: node_modules 52 | // MUX player lazy version loads internally the eager version using 53 | //
React.lazy()
. 54 | const lazy_1 = __importDefault(require("@mux/mux-player-react/lazy")); 55 | // The core of this component is theuseVideoPlayer
hook: it takes 56 | // data from DatoCMS GraphQL API and returns props as expected by the 57 | //<MuxPlayer />
component
It appears that the VideoPlayer
component in react-datocms
is causing the issue due to the missing module @mux/mux-player-react/lazy
.
Environment:
- React version: 18.3.1
- React Native version: 0.75.3
Steps to Reproduce:
- Update
react-datocms
from 3.0.8 to 7.0.1 in a React Native project. - Run the project.
- Observe the error mentioned above.
Additional Information:
- The module
@mux/mux-player-react
seems to be incompatible with React Native or might not be included correctly as a dependency. - I did not have this issue with
react-datocms
version 3.0.8.
Request: Could you please provide guidance on how to resolve this issue? Is there a known workaround or fix available?
Thank you for your assistance!