我正在尝试完成Angular网站上列出的Angular教程,我已经完成了前两个步骤(安装node.js和npm客户端),现在我必须安装Angular CLI,这就是它的去向错误。根据该网站,我应该通过在终端中运行“ npm install -g @ angular / cli”来进行安装。然后,我得到了与某些节点有关的过多警告和错误,并显示了似乎未完成的加载屏幕,最后是这些错误:
npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
我已经搜索了所有这些内容并尝试了各种解决方案,但没有任何效果。 这些解决方案包括运行以下命令集:
npm install -g node-gyp
timeout 120 npm install -g @angular/cli > /dev/null
npm install -g @angular/cli
,尝试以sudo的方式运行所有内容(也没有用)
我在网上发现的一个案例恰好是一个与我完全一样的人,但没有提供解决方案。
我正在运行Ubuntu 18.04.1,具有nodejs v8.10.0和npm 3.5.2
作为参考,可以在以下位置找到该教程:https://angular.io/guide/quickstart#step-1-install-the-angular-cli
这是我尝试运行“ sudo npm install -g @ angular / cli”时遇到的所有错误,如果这有助于清除问题所在。
WARN engine @angular/cli@7.3.8: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @angular/cli@7.3.8: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (culoadDep:symbol-observable ▌ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @schematics/update@0.13.8: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @schematics/angular@7.3.8: wanted: {"node":">= 8.9.0","npm":">= 5.5.1"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @angular-devkit/schematics@7.3.8: wanted: {"node":">= 8.9.0","npm":"loadDep:symbol-observable ▀ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/architect@0.13.8: wanted: {"node":">= 8.9.0","npm":"loadDep:symbol-observable ▌ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/core@7.3.8: wanted: {"node":">= 8.9.0","npm":">= 5.5/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
/usr/local/lib
└── @angular/cli@7.3.8
npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
由于我对这一切还很陌生,所以我不确定这一切意味着什么,因此希望有人能帮助我,谢谢。