Describe the bug
The @mconf/bbb-ui-components-react library has its own node_modules/ with React 19.1.1, while the main BigBlueButton HTML5 project uses React 18.3.1. This version mismatch causes multiple instances of React to be loaded, breaking React Hooks functionality.
To Reproduce
Steps to reproduce the behavior:
- Install
@mconf/bbb-ui-components-react as a local dependency in bigbluebutton-html5
- Use any component from the library that includes hooks (e.g.,
BBBModal)
- Join a meeting
- Interact with the component or open any view that uses the library
Expected behavior
The component should render without errors and React Hooks should work correctly.
Actual behavior
The following error appears in the console:
Uncaught TypeError: Cannot read properties of null (reading 'useState')
at exports.useState (react.development.js:1222:1)
at <component_name>
BBB version, plugin in which the bug happened and SDK version:
dev40
Additional context
The error occurs because the component library imports React 19.1.1 from its own node_modules/, while the main project expects React 18.3.1. This breaks React's Hook system, which relies on a single instance of React.
Solution:
Pin the React version in @mconf/bbb-ui-components-react to 18.3.1 to match bigbluebutton-html5:
Update peerDependencies: "react": "18.3.1" and "react-dom": "18.3.1"
Remove the node_modules/ directory from the library to rely on the parent project's React installation
Describe the bug
The
@mconf/bbb-ui-components-reactlibrary has its ownnode_modules/with React 19.1.1, while the main BigBlueButton HTML5 project uses React 18.3.1. This version mismatch causes multiple instances of React to be loaded, breaking React Hooks functionality.To Reproduce
Steps to reproduce the behavior:
@mconf/bbb-ui-components-reactas a local dependency inbigbluebutton-html5BBBModal)Expected behavior
The component should render without errors and React Hooks should work correctly.
Actual behavior
The following error appears in the console:
BBB version, plugin in which the bug happened and SDK version:
dev40
Additional context
The error occurs because the component library imports React 19.1.1 from its own
node_modules/, while the main project expects React 18.3.1. This breaks React's Hook system, which relies on a single instance of React.Solution:
Pin the React version in
@mconf/bbb-ui-components-reactto 18.3.1 to match bigbluebutton-html5:Update peerDependencies:
"react": "18.3.1"and"react-dom": "18.3.1"Remove the
node_modules/directory from the library to rely on the parent project's React installation