react-datocms icon indicating copy to clipboard operation
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

Open avbutlov opened this issue 5 months ago • 5 comments

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 the useVideoPlayer 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:

  1. Update react-datocms from 3.0.8 to 7.0.1 in a React Native project.
  2. Run the project.
  3. 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!

avbutlov avatar Sep 17 '24 15:09 avbutlov