react-router conflict between react-router-dom@5 and react-router-dom-v5-compat@6 #10521
Replies: 1 comment
-
| Closing this since I realized that it had to do with my webpack configuration, I had messed around with module resolution for the client bundle. I removed that and then this resolutions plus a clean install fixed the warning: "resolutions": {
  "react-router-dom/react-router": "^5.3.4",
  "react-router-dom-v5-compat/react-router": "^6.11.0",
  "react-router-dom-v5-compat/history": "^5.0.0"
} | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently migrating an app from react-router v5 to v6 and I'm using
react-router-dom-v5-compatfor a step by step upgrade, but I keep getting errors fromreact-router-dom-v5-compattrying to reference[email protected], I'm assuming it's a conflict between thereact-router-domandreact-router-dom-v5-compatversions I have installed.My package.json looks like this:
{ "dependencies": { "my-custom-client": "1.0.0", "react-router-dom": "5.3.4", "react-router-dom-v5-compat": "6.11.0" } }And the error looks like this:
Do note that I'm actually using both dependencies through another dependency, let's call it
"my-custom-client", which has both libraries as peerDependencies, hence why the error is being thrown through that package on node_modules.I've already tried adding
"resolutions"to target the correct version ofreact-routerfor both dependencies but I still see the issue, I tried adding it like this:Is there a known conflict between both dependencies being used on another dependency?
Beta Was this translation helpful? Give feedback.
All reactions