-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-router wants history@1.13.x #2682
Comments
Thanks, @chaseadamsio. Yes, this workaround is only for right now. We thought that it would be an ok solution to just do a patch release of RR that doesn't show all warnings from the deprecations in the history package, and in a clean What we didn't think about is that people who already had history@1.15 installed would have to intentionally downgrade to get the warnings to go away. @ryanflorence is working on a blog post right now to help people understand what we're thinking we'll do from here on out, but it basically boils down to:
I'll link to the blog post once he posts. |
Yup, travis stopped working for us because of this and we had to downgrade our dep on history module to fix it. |
@mjackson What do you think of pushing out an interim history release that just drops the depreciation warnings? It might be the easiest all around. |
I think the current workaround is fine. We've documented it and told everyone about it. Next major release will be better. |
@BerkeleyTrue Why did your CI break? |
@mjackson my travis build has also broke (without the workaround). https://travis-ci.org/mike-engel/bkmrkd/jobs/95724906, with my package.json here: https://github.com/mike-engel/bkmrkd/blob/redux-tests-43/package.json#L45 |
oops, me too
|
@mike-engel The key lines from your Travis log are:
But it's strange that you had history 1.15 installed when you specified 1.13 in your package.json... was it cached from a previous |
@mjackson It was trying to install 1.15, because it matched the semver tag for So, while I specified (and most people will this way if they run |
@mjackson Same story here. We had |
Great, thanks for letting us know. We'll definitely fix this in the next release. Please use the workaround for now. |
Just an update here: we've shipped history v1.16 which silences all warnings that were introduced into the history package since v1.13. Please give it a shot and let us know how it goes. If it goes well, we'll update the peer dep on the router. Next time we ship those warnings will be in v2 of history, so you don't have to worry about it breaking your build until you intentionally upgrade. |
I am unable to install ReactRouter due to this issue. I specify a dependency on (what I think is the right version) 1.13.0 but still I get this error. My dependencies from package.json: "dependencies": {
...
"history": "^1.13.0",
"react": "^0.14.3",
"react-dom": "^0.14.3",
"react-router": "^1.0.0"
}, Error: >npm install
npm WARN peerDependencies The peer dependency history@1.13.x included from react-router will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
\
> history@1.16.0 postinstall c:\ws\bridalappnode\node_modules\history
> node ./npm-scripts/postinstall.js
Active code page: 65001
-
> react-router@1.0.2 postinstall c:\ws\bridalappnode\node_modules\react-router
> node ./npm-scripts/postinstall.js
Active code page: 65001
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package history does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-router@1.0.2 wants history@1.13.x
npm ERR! Please include the following file with any support request:
npm ERR! c:\ws\bridalappnode\npm-debug.log It looks like it is trying to install 1.16.0 anyways... How to prevent it? |
Update: changing deps to this seems to fix it: "dependencies": {
...
"history": "1.13.x", <---- changed this
"react": "^0.14.3",
"react-dom": "^0.14.3",
"react-router": "^1.0.0"
}, |
@Download fwiw, that was the recommendation in the opening issue comment of this thread. |
Note that history 1.17.0 is out and doesn't have any deprecation warnings. Use it instead of 1.13.0 for now. |
@chaseadamsio Yes, later I realized that as well... I completely misread the opening post and tried to set the dependency to For me, using a letter instead of number in the version is just so unnatural! I unconsciously assumed that when it said @timdorr Great news! Will try! |
Thanks, updating history in the dependencies did the trick for me. "dependencies": {
"history": "1.17.0", <== updated this line here
"react-router": "^1.0.0-rc4",
} |
There is now also issue with router 3.0.0 and React + React-Dom ^15.... CircleCi builds also complaining: Been holding us up for a while, tried setting dependencies to required ones, but it doesn't work whatever the version. |
@stevematdavies It sounds like your build on Circle is using npm 2.x (I believe this is the default). I haven't used them in a bit (still waiting on an invite to their 2.0 beta. Hint hint to any @circleci folks! 😉 ), but you might try bumping your node version to v6.1.0 (which bundles npm 3) or adding a This is the same format as |
Just wanted to document it here, we can close it but if someone searches for the issue, maybe it'll help. If you get an error like this on
npm install
and you havehistory
as a dependency in your project root:Recommended course of action (for now?) is to change dependencies in
package.json
:cc @mjackson @ryanflorence
The text was updated successfully, but these errors were encountered: