mobx-state-tree
mobx-state-tree copied to clipboard
mst-middlewares has a ^ peer dependency on mobx-state-tree
Bug report
- [X] I've checked documentation and searched for existing issues
- [X] I've made sure my project is based on the latest MST version
Describe the expected behavior mst-middlewares has a ^ peer dependency on mobx-state-tree shouldn't this be >=
https://github.com/mobxjs/mobx-state-tree/blob/e6025cc3d62094fc2b4272ff53607c862efd1975/packages/mst-middlewares/package.json#L52
Hm, good question. @mweststrate, do you know?
Edited this post to update to last versions ("^5.0.2")
The reason for asking is i get the following when installing with:
- node v16.7.0
- npm 7.20.3
in my package.json: "mobx-state-tree": "^5.0.2", "mst-middlewares": "^5.0.2",
https://github.com/mobxjs/mobx-state-tree/blob/e6025cc3d62094fc2b4272ff53607c862efd1975/packages/mst-middlewares/package.json#L52
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/mobx-state-tree
npm ERR! mobx-state-tree@"^5.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mobx-state-tree@"^3.11.0" from [email protected]
npm ERR! node_modules/mst-middlewares
npm ERR! mst-middlewares@"^5.0.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
Yeah probably just needs bumping. Might be a lerna misconfiguration.
On Wed, 1 Sep 2021, 08:06 Raymond Bergen, @.***> wrote:
The reason for asking is i get the following when installing with:
- node v16.7.0
- npm 7.20.3
in my package.json: "mobx-state-tree": "^5.0.1", "mst-middlewares": "^5.0.1",
https://github.com/mobxjs/mobx-state-tree/blob/e6025cc3d62094fc2b4272ff53607c862efd1975/packages/mst-middlewares/package.json#L52
`npm ERR! Invalid Version: ^5.0.1
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Raymond\AppData\Local\npm-cache_logs\2021-09-01T06_56_29_442Z-debug.log PS C:\Source\MyApp\ClientApp> npm i npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: @.*** npm ERR! Found: @.*** npm ERR! node_modules/mobx-state-tree npm ERR! mobx-state-tree@"^5.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer mobx-state-tree@"^3.11.0" from @.*** npm ERR! node_modules/mst-middlewares npm ERR! mst-middlewares@"^5.0.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR!`
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-state-tree/issues/1779#issuecomment-909986934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBEUGK6MHYJWWMKLX2LT7XGH5ANCNFSM5DD7EFFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
"mobx-state-tree" is set in the devDependencies and the peerDependencies.
Seems like the peerDependencies version was not updated.
Another option is "mobx-state-tree": "*" . The "*" will just yield to whatever version the user has specified and otherwise install "mobx-state-tree": "latest" , which really should never happen because people using this will have mst installed.
^ is the correct config for the peer, as compatibility cross majors is not supported nor guaranteed nor likely. If mst-middlewares is not up to date it probably needs republishing.
I completely agree, but npm owners have too many good ideas. I have no strong opinions or skin in the game here btw, just chatting. Idk, pnpm or yarn for the resolutions are almost required to maintain a javascript project for more than 3 months.
Hey folks, looks like this was resolved with https://github.com/mobxjs/mobx-state-tree/pull/1838, so I'm going to close this out.
Thank you!