简体   繁体   English

ubtunu 16.04中未安装angular-cli

[英]angular-cli is not installed in ubtunu 16.04

I have tried multiple times to install angular-cli in my ubuntu 16.04, but everytime I got failed. 我已经尝试过多次在我的Ubuntu 16.04中安装angular-cli,但是每次都失败了。 I am using node version 6.9.1 and npm version 3.10.8. 我正在使用6.9.1版的节点和3.10.8版的npm。 I'm enclosing the errors here in this post. 我将错误附在本文中。

    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/angular-cli/node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    npm WARN @angular/compiler-cli@0.6.4 requires a peer of @angular/compiler@2.0.2 but none was installed.
    npm WARN @angular/compiler-cli@0.6.4 requires a peer of @angular/platform-server@2.0.2 but none was installed.
    npm WARN @angular/compiler-cli@0.6.4 requires a peer of @angular/core@2.0.2 but none was installed.
    npm ERR! Linux 4.4.0-42-generic
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli@latest"
    npm ERR! node v6.9.1
    npm ERR! npm  v3.10.8
    npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-e9ea1451
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall rename

    npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
    npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/pc/Downloads/node-v6.9.1/npm-debug.log
    npm ERR! code 1

Does anyone have a fix? 有人修复吗?

https://github.com/angular/angular-cli/issues/1190 https://github.com/angular/angular-cli/issues/1190

Try running 尝试跑步

sudo npm uninstall -g angular-cli
sudo npm install-g angular-cli

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM