Angular CLI を npm install しようとしたら、EEXIST: file already exists .... といったエラーが出た場合の対応
環境
- macOS 10.15.5
- node: 13.11.0
- npm: 6.13.7
angular cli をインストールしようとした際に遭遇したエラー
% npm install -g @angular/cli
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@angular/cli/bin/ng
npm ERR! dest /usr/local/bin/ng
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@angular/cli/bin/ng' -> '/usr/local/bin/ng'
npm ERR! File exists: /usr/local/bin/ng
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/watashi/.npm/_logs/2020-07-09T08_20_01_508Z-debug.log
解決した方法
- エラーに表示されていた通り、
File exists: /usr/local/bin/ng.
なのでRemove the existing file and try again, or run npm with --force to overwrite files recklessly.
します
% sudo rm -rf /usr/local/bin/ng
その後、通常通りインストールします
% npm install -g @angular/cli
Author And Source
この問題について(Angular CLI を npm install しようとしたら、EEXIST: file already exists .... といったエラーが出た場合の対応), 我々は、より多くの情報をここで見つけました https://qiita.com/colorrabbit/items/e5828c9943c13c7915c2著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .