@graphiql/toolkit tried to access graphql-ws (a peer dependency) but it isn't provided by its ancestors
See original GitHub issueAccording to https://github.com/graphql/graphiql/issues/2405#issuecomment-1133928930 it should probably work somehow?
I’m using Yarn PnP. I require "graphiql": "^1.9.1",
and use it as
import GraphiQLComponent from 'graphiql';
...
export const GraphiQL: React.FC = () => (
<GraphiQLComponent
fetcher={graphQLFetcher}
editorTheme="material"
/>
);
also @graphiql/toolkit 0.5.0
is in lockfile:
"@graphiql/toolkit@npm:^0.5.0":
version: 0.5.0
resolution: "@graphiql/toolkit@npm:0.5.0"
dependencies:
"@n1ru4l/push-pull-async-iterable-iterator": ^3.1.0
meros: ^1.1.4
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
graphql-ws: ">= 4.5.0"
checksum: cc4b7497f2dd96ab11f826e2ea35a8b6c053801a048a103c48402dad98f459c785565e934e83c26b23d6e950ad7f3a04b605250037bbd07d058c177073f5f833
languageName: node
linkType: hard
but I’m getting a warning:
Module not found: Error: @graphiql/toolkit tried to access graphql-ws (a peer dependency) but it isn’t provided by its ancestors; this makes the require call ambiguous and unsound.
I tried requiring "graphql-ws": "^5.8.2",
but still getting the warning mentioned above.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7
Top Results From Across the Web
graphiql/toolkit tried to access graphql-ws (a peer dependency ...
graphiql/toolkit tried to access graphql-ws (a peer dependency) but it isn't provided by its ancestors.
Read more >[Bug]A package is trying to access a peer dependency that ...
esm.js Module not found: A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't...
Read more >graphql-ws - npm
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. Continuous integration graphql-ws. Use ...
Read more >node.js - npm install fails with Conflicting peer dependency
For first error I tried to install npm by below 2 command in Terminal one after another. It fixes for me: npm install...
Read more >Implicit transitive peer dependencies - DEV Community
You won't "implicitly inherit" the peer dependencies declared in Foo . ... a peer dependency on @babel/core , and we're not providing it!...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, in v2 this issue is no more
@simPod I understand this issue now, and was able to reproduce your situation completely. Actually,
graphql-ws
has been an optional peer dependency for@graphiql/toolkit
since the release of the version of 0.7.2 of@graphiql/toolkit
. I guess you can remove the unnecessary waring message when you upgradegraphiql
to the version of 2.0.5 or more than that.related: #2753