angular-cli: unable to install cli

user@user-Vostro-3560:~$ npm install -g angular-cli npm ERR! registry error parsing json npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 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.17: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”}) npm WARN @angular/core@2.4.6 requires a peer of rxjs@^5.0.1 but none was installed. npm ERR! Linux 3.19.0-80-generic npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “angular-cli” npm ERR! node v6.9.5 npm ERR! npm v4.2.0 npm ERR! path /usr/local/bin/ng npm ERR! code EEXIST

npm ERR! Refusing to delete /usr/local/bin/ng: …/lib/node_modules/@angular/cli/bin/ng symlink target is not controlled by npm /usr/local npm ERR! File exists: /usr/local/bin/ng npm ERR! Move it away, and try again.

npm ERR! Please include the following file with any support request: npm ERR! /home/user/.npm/_logs/2017-02-07T11_23_43_948Z-debug.log

i couldnt find the debug file mentioned above. There is no( _log) folder in npm.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (7 by maintainers)

Most upvoted comments

you need to remove ng from /usr/local/bin install again sudo npm i -g angular/cli

its issue of proxy… installed perfectly on home wifi… thank you @catull @Ionaru

  1. sudo nautilus

  2. go to /usr/local/bin/

  3. delete ng file

  4. then sudo npm install -g @angular/cli

    / \ _ __ __ _ _ | | __ _ _ __ / | | | | / △ \ | ’ \ / _ | | | | |/ _ | '| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/

Angular CLI: 6.1.5 Node: 10.8.0 OS: linux x64 Angular: …

Package Version

@angular-devkit/architect 0.7.5 @angular-devkit/core 0.7.5 @angular-devkit/schematics 0.7.5 @schematics/angular 0.7.5 @schematics/update 0.7.5 rxjs 6.2.2 typescript 2.9.2

Also, instead of npm install -g angular-cli, use npm install -g @angular/cli