npm 호출시 다음과 같은 에러가 발생했다.
Error: Cannot find module 'npmlog'at Function.Module._resolveFilename (module.js:455:15)at Function.Module._load (module.js:403:25)at Module.require (module.js:483:17)at require (internal/module.js:20:19)at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:13at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)at Module._compile (module.js:556:32)at Object.Module._extensions..js (module.js:565:10)at Module.load (module.js:473:32)at tryModuleLoad (module.js:432:12)
npm 의 문제가 있으니 이를 수정한 업그레이드가 있을까하고 업그레이드를 시도했으니 npm 6.6.0 가 이미 설치되어 있다고 한다.
✗ brew upgrade npm==> Auto-updated Homebrew!Updated 1 tap (homebrew/core).==> Updated Formulaebacula-fd erlang galen irssi leiningen liquibase macosvpn open-babel openssl ✔ openssl@1.1 privoxy repo zpaqError: npm 6.6.0 already installed
그래도 동일한 문제가 발생했다. 이와 관련해서 인터넷 검색을 문제를 찾아보니 Cannot find module 'npmlog' following homebrew update & upgrade가 나왔다.
위에 나온 절차에 따라 node 삭제작업을 진행한다.
brew uninstall nodeUninstalling /usr/local/Cellar/node/6.6.0... (3,669 files, 40.9M)node 6.1.0, 6.3.1 are still installed.Remove all versions with `brew uninstall --force node`.➜ honeymon git:(master) ✗ brew uninstall --force nodeUninstalling node... (7,484 files, 78.5M)➜ honeymon git:(master) ✗ sudo rm -rf /usr/local/lib/node_modulesPassword:➜ honeymon git:(master) ✗ brew install node==> Downloading https://homebrew.bintray.com/bottles/node-6.6.0.el_capitan.bottle.tar.gzAlready downloaded: /Users/honeymon/Library/Caches/Homebrew/node-6.6.0.el_capitan.bottle.tar.gz==> Pouring node-6.6.0.el_capitan.bottle.tar.gz==> Using the sandbox==> CaveatsPlease note by default only English locale support is provided. If you needfull locale support you should either rebuild with full icu:`brew reinstall node --with-full-icu`or add full icu data at runtime following:https://github.com/nodejs/node/wiki/Intl#using-and-customizing-the-small-icu-buildBash completion has been installed to:/usr/local/etc/bash_completion.d==> Summary🍺 /usr/local/Cellar/node/6.6.0: 3,669 files, 40.9M
'Javascript > Framework & Libs' 카테고리의 다른 글
[javascript] gulpjs 를 이용한 프론트엔드 프로젝트 빌드 기본구성 (0) | 2016.08.29 |
---|