Closed m0rdreck closed 2 years ago
Ref: INT-2848
I got this issue and managed to solved it. In my case, my local machine is using npm
and my docker is using yarn
. I changed my docker script to use npm and also upgrade my local machine node version from 14 to 16.
Hope it does give you some clues.
Hello @dellasys, i try with node 16.14.2 but same error.
Hello, same issue here. I have tried to update node but same error. Do you know other workaround? Thank you
Have you tried delete node_modules and npm install
?
Yes, after moving from yarn to npm it is now working. Thank you!
This problem occurs if you haven't migrated to the newest version of React. The solution is to tell your package manager to enforce the same versions of @types/react
and @types/react-dom
packages, in all dependencies that require them.
In the case of npm you have to add the following properties to package.json
:
"scripts": {
"preinstall": "npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
},
"resolutions": {
"@types/react": "17.0.6",
"@types/react-dom": "17.0.5"
}
Another possibility is that the yarn.lock
or package-lock.json
needs to be regenerated because multiple versions of the react libraries and types are being included.
In the case of yarn
I would normally fix this sort of problem by deleting the node_modules
folder and yarn.lock
file followed by re-running yarn install
to regenerate both.
I don't believe this is an actual problem with the tinymce-react repository though so I will convert this issue into a discussion so people can still see it.
Hello, I have one error with Editor component.
Type error: 'Editor' cannot be used as a JSX component. Its instance type 'Editor' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'ReactElement<{ ref: RefObject; id: string; }, string | JSXElementConstructor>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<{ ref: RefObject; id: string; }, string | JSXElementConstructor>' but required in type 'ReactPortal'.
Thank for futur help.