【发布时间】:2021-09-16 13:55:39
【问题描述】:
我想安装@angular/cli但它不起作用,我重新安装了Node但问题仍然存在。
文本输出:
MacBook-Pro-de-MAC:~ macayoub$ npm -v
6.14.4
MacBook-Pro-de-MAC:~ macayoub$ node -v
v12.16.2
MacBook-Pro-de-MAC:~ macayoub$ sudo npm install -g @angular/cli
Password:
npm WARN deprecated request@2.88.2: 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 /Users/macayoub/.npm-global/bin/ng
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@angular/cli/bin/ng' -> '/Users/macayoub/.npm-global/bin/ng'
npm ERR! File exists: /Users/macayoub/.npm-global/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/macayoub/.npm/_logs/2020-04-21T08_23_36_422Z-debug.log
【问题讨论】:
-
错误信息直接说明了怎么办:“删除现有文件再试一次,或者用--force运行npm鲁莽覆盖文件。”。您是否尝试过使用这两种解决方案中的任何一种?
-
这能回答你的问题吗? Angular CLI Error path and code EEXIST