catalog icon indicating copy to clipboard operation
catalog copied to clipboard

Error: Can't resolve 'history/lib/DOMStateStorage'

Open drewdecarme opened this issue 5 years ago • 3 comments

I'm in the process of trying to integrate Catalog into an existing repository that I have to ensure that I can document the latest versions of my components. However, I'm getting the below error

ERROR in ./node_modules/react-router-scroll/lib/StateStorage.js
Module not found: Error: Can't resolve 'history/lib/DOMStateStorage'

I took a look at this and it's due to the fact that I have a new version of history installed. Another package that is being utilized is react-router-scroll and it currently requires history@^2.0.0 || history@^3.0.0. I'd really love to use this, but it would require the history package to be updated to at least version 4 which would then require an upgrade to react-router@^4 thus causing react-router-scroll to be useless.

I saw that catalog v4 is in pretty good progress right now. Currently, react-router-scroll doesn't support react-router 4 (you can see the discussion here: https://github.com/taion/react-router-scroll#react-router-scroll-- However, there is this package... https://github.com/ytase/react-router-scroll

Are there any plans to update this so we can utilize the most up to date packages?

Another idea would be to include history@^2.0.0 || history@^3.0.0 as a production dependency so NPM resolves it locally rather than globally when building

drewdecarme avatar Feb 07 '19 03:02 drewdecarme

I'm facing the same issue, any updates about this? I'm currently using react-router 5.0.0 ??

darkfrontcode avatar May 10 '19 12:05 darkfrontcode

I got around this by simply doing a npm install --save [email protected]. Not ideal, but it does the job in the meanwhile.

michaelpelletier avatar Oct 09 '19 13:10 michaelpelletier

Any news here?

riccardolardi avatar Jul 23 '20 08:07 riccardolardi