$ npm install -g ganache-cli

> scrypt@6.0.3 preinstall /usr/local/lib/node_modules/ganache-cli/node_modules/scrypt
> node node-scrypt-preinstall.js

npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/ganache-cli/cli.js
npm ERR! dest /usr/local/bin/ganache-cli
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/ganache-cli/cli.js' -> '/usr/local/bin/ganache-cli'
npm ERR! File exists: /usr/local/bin/ganache-cli
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/cona/.npm/_logs/2020-08-06T08_10_10_302Z-debug.log

 

node 버전이 높으면 호환이 안되는 것 확인 (컴파일 에러까지 이어짐)

 

 

해결방법


노드 버전 문제라고 판단해 버전 다운그레이드 진행

 

# node version manager 다운로드
$ brew install nvm

 

다운로드 진행 이후에 뜨는 내용 따라 진행 (Dapp 진행은 12 버전 추천)

 

$ nvm ls

# node 12.14.1 설치
$ nvm install 12.14.1

# 12.14.1로 바뀌었나 확인
$ node -v

# 다른 버전을 사용하고 싶다면 use 사용
$ nvm use 노드버전

 

 

 

참고


https://gist.github.com/falsy/8aa42ae311a9adb50e2ca7d8702c9af1

 

NVM(Node Version Manager) 맥OS에서 설치 & 사용하기

NVM(Node Version Manager) 맥OS에서 설치 & 사용하기. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

 

 

+ Recent posts