개발여행

solana)metaplex: npm install 중 Could not resolve dependecy 에러 본문

BlockChain

solana)metaplex: npm install 중 Could not resolve dependecy 에러

Titan. 2021. 9. 14. 16:38

메타플렉스를 사용하기 위해 필요 라이브러리 설치중 에러가 발생했다.

 

npm notice 
npm notice New minor version of npm available! 7.21.1 -> 7.23.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.23.0
npm notice Run npm install -g npm@7.23.0 to update!
npm notice 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: web@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from web@0.1.0
npm ERR!   packages/web
npm ERR!     web@0.1.0
npm ERR!     node_modules/web
npm ERR!       workspace packages/web from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0-alpha" from react-virtualized@9.22.3
npm ERR! node_modules/react-virtualized
npm ERR!   react-virtualized@"^9.22.3" from web@0.1.0
npm ERR!   packages/web
npm ERR!     web@0.1.0
npm ERR!     node_modules/web
npm ERR!       workspace packages/web 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! See /home/titan/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/titan/.npm/_logs/2021-09-14T06_14_26_726Z-debug.log

우선 상단의 notice는 크게 상관이 없어보여 무시했다.

 

하지만 아래쪽의 ERR!은 문제가 있어보인다.

 

metaplex를 사용하는데 필요한 라이브러리 설치 중 뭔가 호환되지 않는것으로 보인다.

 

구글링을 통해 알아보니 npm 7.x버전에서 충돌이 발생한다고 한다.

 

npm -g install npm@6.x
removed 69 packages, changed 100 packages, and audited 438 packages in 4s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

 

위와 같이 npm 버전을 강제로 6.x버전으로 낮춰서 설치하면 정상적으로 설치가 된다.