block is not a BlockNode
justinlazaro-ubidy opened this issue ยท 7 comments
I'm getting this too on some of my repos. It has to do with draft-js 10.5 adding new code related to the blocks.
Was there any resolution or workaround to this? @justinlazaro-ubidy
Edit: Fixing version to 10.4 seemed to do the trick for me temporarily. @webdeveloperpr Do you have an idea of what they changed around the block check? Seems to be the case that the custom components which Im using that extend Block
might be failing an instance check or something...
I solved my own version of this problem, and it turned out to be an npm/npm link/dependency management issue/ rather than a problem with draft-js@0.10.5
This example in this stackoverflow answer explains this BlockNode error. https://stackoverflow.com/a/34645112
This Medium article describes the problem really well https://medium.com/@penx/managing-dependencies-in-a-node-package-so-that-they-are-compatible-with-npm-link-61befa5aaca7
npm link
https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af
issue I created on draft-js' repo.
facebookarchive/draft-js#1763
@githubflub can you please give some more information on how you solved it? I am probably having a similar issue, i am using draft-js as peer dependancy in multiple modules.
@farhansalam the links I posted explain the problem better than I can. My solution came from the first medium article - just add symlinks: false
in your webpack config's resolve
object.
This is driving me nuts. ๐
@farhansalam @githubflub i've cloned/fork'd the React Draft WYSIWYG repo and yarn link'd.
But using the embed button keeps through a block is not a BlockNode
error.
Things i've tried:
- downgrading both my forkd repo and actual project to draftJS 0.10.4
- identifying any other instances of draft-js.
- matching up versions of React
- ensuring node_modules are cited in
webpack.config.js
- specifically react:
alias: {
react: path.resolve('node_modules/react'),
modules: [path.resolve(__dirname, "node_modules")],
},
Anyone know if this issue has moved fwd in the last year? ๐ญ
I've had two different version of draft-js (0.11.0 and ^0.10.0), one version in dependences of used lib and another one in my dependences. If you have the same problem, try uninstall all lib with draft-js, drop node_modules, and install libs again, but use only one version.
@githubflub thanks! Your comment helped me to understand my mistake.