magento / pwa-studio

šŸ› Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 683 forks source link

`npm install` Conflicting peer dependency: graphql-ws #4302

Closed OliverRC closed 2 months ago

OliverRC commented 2 months ago

Describe the bug

From a vanilla pwa-studio cli project using the defaults, you cannot npm install. Root error Conflicting peer dependency: graphql-ws

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @apollo/client@3.5.10
npm ERR! Found: graphql-ws@4.9.0
npm ERR! node_modules/graphql-ws
npm ERR!   graphql-ws@"^4.4.1" from @graphql-tools/url-loader@6.10.1
npm ERR!   node_modules/@graphql-tools/url-loader
npm ERR!     @graphql-tools/url-loader@"^6.0.0" from graphql-config@3.4.1
npm ERR!     node_modules/graphql-config
npm ERR!       graphql-config@"^3.0.2" from eslint-plugin-graphql@4.0.0
npm ERR!       node_modules/eslint-plugin-graphql
npm ERR!         dev eslint-plugin-graphql@"~4.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional graphql-ws@"^5.5.5" from @apollo/client@3.5.10
npm ERR! node_modules/@apollo/client
npm ERR!   dev @apollo/client@"~3.5.0" from the root project
npm ERR!   peer @apollo/client@"~3.5.0" from @magento/pagebuilder@9.3.1
npm ERR!   node_modules/@magento/pagebuilder
npm ERR!     dev @magento/pagebuilder@"~9.3.1" from the root project
npm ERR!   3 more (@magento/peregrine, @magento/upward-js, @magento/venia-ui)
npm ERR! 
npm ERR! Conflicting peer dependency: graphql-ws@5.16.0
npm ERR! node_modules/graphql-ws
npm ERR!   peerOptional graphql-ws@"^5.5.5" from @apollo/client@3.5.10
npm ERR!   node_modules/@apollo/client
npm ERR!     dev @apollo/client@"~3.5.0" from the root project
npm ERR!     peer @apollo/client@"~3.5.0" from @magento/pagebuilder@9.3.1
npm ERR!     node_modules/@magento/pagebuilder
npm ERR!       dev @magento/pagebuilder@"~9.3.1" from the root project
npm ERR!     3 more (@magento/peregrine, @magento/upward-js, @magento/venia-ui)
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! 
npm ERR! 

To reproduce

Steps to reproduce the behavior:

  1. Scaffold app using npx @magento/create-pwa
  2. npm install

Expected behavior

npx @magento/create-pwa should output a functional node project that allows additional requirements to be installed.

Please let us know what packages this bug is in regards to:

m2-assistant[bot] commented 2 months ago

Hi @OliverRC. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

glo42707 commented 2 months ago

hi @OliverRC

Please reffer below official document link for scefholding project I tested and it is working abselutly fine. https://developer.adobe.com/commerce/pwa-studio/tutorials/setup-storefront/

also please check you node version and your local magento project if you are using any for scafholding proj and clean your node cache before start scefholding process.

if still reprodicble issue at your end, please share any video along with steps you are following.

Attachment Proof image

glo42707 commented 2 months ago

as per process closing this issue since no reply from reporter. Feel free to reopen in case any still reproducible.