I'm trying to locally build the oodt_fm_plugin
NPM package and link it locally to the oodt_opsui_sample_app
. However, when I'm trying to do that, the following error is thrown in the browser.
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
The error goes away if I remove the withStyles
HOC from the components in oodt_fm_plugin
, but I want to preserve it for the material UI styles.
React components in the oodt_fm_plugin
have been exported as follows. ( This plugin can be viewed at https://github.com/apache/oodt/tree/development/react-components/oodt_fm_plugin. )
export default withStyles(styles)(Product);
What I tried to overcome this are as follows, but none of those solved the issue.
- Making
react
andreact-dom
packages in the plugin, dev dependencies - Adding the following snippet to the
webpack.config.js
of the plugin.
resolve: {
modules: [path.resolve('node_modules'), 'node_modules'],
},
Can someone point me in the right direction so that I can set up both oodt_fm_plugin
and oodt_ui_sample_app
correctly in local dev environment? Helpful advice is highly appreciated.