polotno-project / polotno-board

Roadmap and bug-tracker for the Polotno project.
https://polotno.dev/
9 stars 1 forks source link

Polotno brokwen when I use react routes #9

Closed eduaugusto10 closed 3 years ago

eduaugusto10 commented 3 years ago

I create Polotno outside the react routes and the application works, but if I copy and paste the application inside react routes, it broken. image my code image image

The error is "Cannot read property 'alternate' of undefined", do you know where is my error?

eduaugusto10 commented 3 years ago

I found an issue like mine, but to Konva https://github.com/konvajs/react-konva/issues/171 I installed a react version >17 and the problem continues

lavrton commented 3 years ago

Try to clear cache from your build program and reinstall dependencies (make sure react v>17). If it doesn't work please post your package-lock.json or yarn.lock.

I am sure that is an issue from version conflict of react and react-konva (used by polotno).

eduaugusto10 commented 3 years ago

Hell @lavrton , I clear the cache, delete and reinstall dependencies, my react is v>17 , about polotno and konva I found this in yarn.lock

polotno@^0.16.0: version "0.16.0" resolved "https://registry.yarnpkg.com/polotno/-/polotno-0.16.0.tgz#17864111b3be3df9282f35cbbff02194c67d5c97" integrity sha512-qMgPVBChi071aYfKmMd4d/ZvMkh+cD3HxvAuv41GNcMUjpqgOqPZYQpJz4dydloxXEfvE0bV8CaO9E3d6q5PMw== dependencies: "@blueprintjs/core" "^3.41.0" "@blueprintjs/select" "^3.15.8" "@emotion/core" "^11.0.0" "@emotion/react" "^11.1.5" "@emotion/styled" "^11.1.5" "@meronex/icons" "^4.0.0" konva "^7.2.5" mobx "6.1.8" mobx-react-lite "^3.2.0" mobx-state-tree "5.0.1" mst-middlewares "5.0.1" nanoid "^3.1.21" react-color "^2.19.3" react-konva "^17.0.1-3" swr "^0.5.2" use-image "^1.0.7"

react-konva@^17.0.1-3: version "17.0.1-3" resolved "https://registry.yarnpkg.com/react-konva/-/react-konva-17.0.1-3.tgz#4931c0de642a4ed511ec5aaa2ee113f32d92c68e" integrity sha512-vbbVyf+IcapVOYu+6w3Wc8BMilQ5zq1P2YaUMSkr4OwcWHvK2hxpJCMldi+wOSOZWoWJBXchWfFvmQHcO55KPA== dependencies: react-reconciler "~0.26.1" scheduler "^0.20.1"

konva@^7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/konva/-/konva-7.2.5.tgz#9b4ac3a353e6be66e3e69123bf2a0cbc61efeb26" integrity sha512-yk/li8rUF+09QNlOdkwbEId+QvfATMe/aMGVouWW1oFoUVTYWHsQuIAE6lWy11DK8mLJEJijkNAXC5K+NVlMew==

If you want more info, please tell me. I'll create a new project only with react routes and polotno, because the actual project has many things

lavrton commented 3 years ago

I'll create a new project only with react routes and polotno

Please do that. So I can clone and reproduce it.

eduaugusto10 commented 3 years ago

I reproduce react router and polotno and works well, so, i'll close the ticket. Thanks @lavrton for your help