LISK개발_98

현재 Node.js 23.9.0 버전을 삭제하려 했을 때 발생한 오류 메시지는 다음과 같습니다.

Error: Refusing to uninstall /opt/homebrew/Cellar/node/23.9.0
because it is required by mongosh, react-native-cli and typescript, which are currently installed.

이 에러는 현재 설치된 mongosh, react-native-cli, typescript 등이 Node.js 버전에 의존하고 있어서 삭제를 막고 있는 것입니다.


⚙️ 해결 방법

방법 1️⃣: 강제 삭제 후 필요한 패키지 재설치 (권장)

다음 명령어로 Node.js를 강제 삭제 후, 필요한 패키지를 Node 20 버전 위에서 다시 설치합니다.

brew uninstall --ignore-dependencies node

그다음 Node 20 설치:

brew install node@20
brew link --overwrite node@20

이후, 기존에 설치한 도구(mongosh, react-native-cli, typescript)를 다시 설치:

npm install -g mongosh react-native-cli typescript

방법 2️⃣: 의존성 도구 먼저 제거 후 삭제 (안전한 방법)

먼저 의존성 도구를 삭제하고 Node.js를 삭제하는 방법입니다.

npm uninstall -g mongosh react-native-cli typescript
brew uninstall node

Node 20 버전 설치 후 재설치:

brew install node@20
brew link --overwrite node@20

npm install -g mongosh react-native-cli typescript

권장 방식 🎯

대부분의 경우 방법 1이 빠르고 효율적이며 일반적으로 안전합니다. 다만 민감한 작업환경이라면 방법 2를 권장합니다.

ubuntu@ex-bastion-server:~/liskdev$ node check-network.js 

Testing basic network connectivity…

Resolving google.com…

✅ Success: google.com resolved to 142.251.222.46

Making HTTP request to https://google.com…

✅ HTTP connection successful: 200 OK

Resolving cloudflare.com…

✅ Success: cloudflare.com resolved to 104.16.133.229

Making HTTP request to https://cloudflare.com…

✅ HTTP connection successful: 200 OK

Resolving github.com…

✅ Success: github.com resolved to 20.200.245.247

Making HTTP request to https://github.com…

✅ HTTP connection successful: 200 OK

Checking Lisk API endpoints…

Resolving service.lisk.com…

❌ DNS resolution failed: getaddrinfo ENOTFOUND service.lisk.com

Resolving mainnet.lisk.com…

✅ Success: mainnet.lisk.com resolved to 2a01:4f8:1c17:8016::1

Resolving testnet.lisk.com…

❌ DNS resolution failed: getaddrinfo ENOTFOUND testnet.lisk.com

Resolving service.lisk.io…

❌ DNS resolution failed: getaddrinfo ENOTFOUND service.lisk.io

Resolving mainnet.lisk.io…

❌ DNS resolution failed: getaddrinfo ENOTFOUND mainnet.lisk.io

Resolving testnet.lisk.io…

❌ DNS resolution failed: getaddrinfo ENOTFOUND testnet.lisk.io

Resolving api.lisk.com…

❌ DNS resolution failed: getaddrinfo ENOTFOUND api.lisk.com

Resolving api.lisk.io…

❌ DNS resolution failed: getaddrinfo ENOTFOUND api.lisk.io

Comments

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다