v2.5.2
Giriş yap

Npm uyum sorunu

canooo3
237 defa görüntülendi
    Running "npm install" in /home/expo/workingdir/build directory
npm
ERR! code ERESOLVE
npm
ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/graphql
npm ERR!   graphql@"^15.8.0" from the root project
npm ERR!
peer graphql@"^15.0.0 || ^16.0.0" from @apollo/[email protected]
npm ERR!   node_modules/@apollo/client
npm ERR!     @apollo/client@"^3.9.6" from the root project
npm ERR!   13 more (@expo/cli, @graphql-typed-document-node/core, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.3.1" from [email protected]
npm ERR! node_modules/react-apollo
npm ERR!   react-apollo@"^3.1.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/graphql
npm ERR!   peer graphql@"^14.3.1" from [email protected]
npm ERR!   node_modules/react-apollo
npm ERR!     react-apollo@"^3.1.5" 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! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/expo/.npm/_logs/2024-05-01T06_37_32_532Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /home/expo/.npm/_logs/2024-05-01T06_37_32_532Z-debug-0.log
npm install exited with non-zero code: 1
    

bunun için napmalıyım npm install --force yaptım fakat yok

ebykdrms
169 gün önce

Aldığın hata mesajından anlaşılan o ki,
react-apollo paketi, graphql paketinin "^14.3.1" sürümünü gerektiriyor.
@apollo/client paketi de graphql paketinin "^15.0.0" veya "^16.0.0" sürümünü gerektiriyor.
Bu çakışma nedeniyle npm, graphql paketinin hangi sürümüne karar vereceğini bilemiyor.

Sorun olmayacaksa, graphql paketinin güncel sürümünü yüklersen çakışma çözülür gibi görünüyor.
Bunun için package.json dosyandaki dependencies bölümünde graphql sürümünü bulup güncel sürümü verebilirsin. Örn:

"dependencies": {
    "react-apollo": "^3.1.5",
    "@apollo/client": "^3.9.6"
    "graphql": "^16.8.1",
}

İşe yarar mı bilmem tabi.