【问题标题】:Error when trying to install angular on Suse server尝试在 Suse 服务器上安装 Angular 时出错
【发布时间】:2019-03-21 09:10:14
【问题描述】:

我试图以 root 身份在 Suse 服务器上安装 Angular,但由于我无法理解的原因,我收到以下错误:

# npm install -g @angular/cli
npm ERR! addLocal Could not install angular/cli
npm ERR! Error: ENOENT, stat 'angular/cli'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.7.10-1.4-xen
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@angular/cli"
npm ERR! cwd /root
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! path angular/cli
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

我知道 ENOENT 错误会表明权限不正确,但作为 root 我认为这不应该是一个因素。任何帮助将不胜感激。

【问题讨论】:

  • 看来你的 npm 版本太旧了!您可以更新它并再次尝试安装吗?
  • @Ronald Woods 检查我的升级节点版本的答案。

标签: node.js angular jenkins suse


【解决方案1】:

从错误消息中可以看出,npmnode 版本太旧,无法安装 cli。从Node js website 安装最新的稳定版本并再次使用node -vnpm -v 查看版本。您可以尝试使用最新的稳定版本 8.12.0 的节点。安装稳定版node后需要再次运行npm install -g @angular/cli命令。

【讨论】:

    猜你喜欢
    • 2012-01-16
    • 2013-04-14
    • 2021-10-20
    • 1970-01-01
    • 2020-02-26
    • 1970-01-01
    • 2014-03-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多