-
[npm] npm package 설치 실패시■ Front-End/- Angular 2019. 9. 15. 14:57
프로젝트를 만들어보기 위해 npm 패키지를 설치하려고 했는데 아래와 같은 에러가 발생했다.
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:152:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)구글링해보니 이럴 때에는 node를 삭제한뒤 다시 설치하면 해결된다!
1. node_modules 삭제
sudo rm -rf /usr/local/lib/node_modules
2. npm 환경 파일 삭제
sudo rm -rf ~/.npm
3. node 삭제
brew uninstall --ignore-dependencies node
4. homebrew를 이용한 node 삭제
brew uninstall --force node
5. homebrew를 이용한 node 설치
brew install node
Error: Cannot find module '../lib/utils/unsupported.js' while using Ionic
I always get this error message when I run "Ionic start project name": Error message Running command - failed![ERROR] An error occurred while running npm install (exit code 1): module.js:471...
stackoverflow.com
'■ Front-End > - Angular' 카테고리의 다른 글
[Angular] Observable & Observer (0) 2019.10.02 [Angular] Data binding (0) 2019.09.26 [Angular] Angular Arichitecture (0) 2019.09.24 [Angular] IntelliJ에서 Angular-CLI를 이용한 프로젝트 만들기 (0) 2019.09.15 [TypeScript] TypeScript란? (0) 2019.09.03