You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running bolt, then cd packages/website && yarn start, I get this error:
error Cannot use GraphQLScalarType "JSON" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
I can confirm multiple versions of graphql with yarn why:
❯ yarn why graphql
=> Found "[email protected]"
info Has been hoisted to "graphql"
info This module exists because it's specified in "dependencies".
=> Found "gatsby#[email protected]"
info This module exists because "gatsby" depends on it.
=> Found "relay-compiler#[email protected]"
info This module exists because "gatsby#relay-compiler" depends on it.
Adding a resolutions field to packages/website/package.json:
Bolt doesn't do anything special with installation. It will resolve in exactly the same way as yarn, the only difference is that it symlinks at the end?
I have a Bolt monorepo setup with a graphql server in
packages/server
, and a Gatsby site inpackages/website
:packages/server/package.json
packages/website/package.json
After running
bolt
, thencd packages/website && yarn start
, I get this error:I can confirm multiple versions of
graphql
withyarn why
:Adding a resolutions field to
packages/website/package.json
:Doesn't make any different (appears to be ignored entirely).
The text was updated successfully, but these errors were encountered: