I am trying to contribute to an npm package (react-draft-wysiwyg) but keep getting (what i think are) Webpack errors.
First i try to click the embed button of draft-js and it errors saying "block is not a BlockNode" - then i follow blogs/posts like this https://github.com/facebook/draft-js/issues/1763 i match peer dependencies and main project pkg json dependencies to draft-js v0.10.4, re-yarn and it says
Element ref was specified as a string (editorContainer) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
So in my project's webpack.config.js i have:
alias: {
react: path.resolve('node_modules/react'),
modules: [path.resolve(__dirname, "app"), "node_modules"],
},
I really think these issues are stemming from the webapp trying to pull in different versions of react from the local yarn link'd one.
How do i tell Webpack to only ever use top-level, over everything else?
Help?