mobxjs / mst-gql

Bindings for mobx-state-tree and GraphQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mobx 6 and MST 5 support?

arodik opened this issue · comments

Hi. I want to use this fancy library, but it turns out that it requires old MST and Mobx in the peer dependencies list. Dev dependencies list requires fresher versions, so I'm confused a little bit. Do you have plans to support MST 5 and Mobx 6?

Will take care of this, thanking you for pointing it out. The library should support whatever is listed in the dev dependencies list @arodik.

Are these peerDependencies really needed? It trips rush package management.

 ERROR  @rush-temp/fe-models: mst-gql@0.14.1 requires a peer of mobx@^4.0.0 || ^5.0.0 but version 6.3.3 was installed.

I appreciate that npm vs yarn is a crazily opinionated subject but sometimes you have to use npm because of external reaons!

I found I had to use specific versions and then force npm to ignore the mismatches:

$ npm install mobx-state-tree@5.0.1 mobx-react@7.2.1 mst-gql@0.14.1 mobx@6.1.8 graphql-request
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: uid-frontend@0.8.2
npm ERR! Found: mobx@6.1.8
npm ERR! node_modules/mobx
npm ERR!   mobx@"6.1.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mobx@"^4.0.0 || ^5.0.0" from mst-gql@0.14.1
npm ERR! node_modules/mst-gql
npm ERR!   mst-gql@"0.14.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!

I read over all the peer package dependencies, nothing jumps out at me as an incompatibility and all these versions should work together (so ran npm install mobx-state-tree@5.0.1 mobx-react@7.2.1 mst-gql@0.14.1 mobx@6.1.8 graphql-request --force)

Should be resolved as of 0.17.