0

I'm tryin' to install angular-cli into my linux Mint 32bit computer. But There's a failure to install it. My command into terminal is:

npm install -g angular-cli

And the output:

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/home/shwokat/!/.npm-global-me/bin/ng -> /home/shwokat/!/.npm-global-me/lib/node_modules/angular-cli/bin/ng

/home/shwokat/!/.npm-global-me/lib

└─┬ angular-cli@1.0.0-beta.28.3 
  └── UNMET PEER DEPENDENCY rxjs@^5.0.1

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":"ia32"})
npm WARN @angular/core@2.4.7 requires a peer of rxjs@^5.0.1 but none was installed.

Please write how to overcome this error & install angular-cli correctly ...

Brocco
  • 62,737
  • 12
  • 70
  • 76
Showkat Ali
  • 45
  • 1
  • 2
  • 8
  • Possible duplicate of [How to solve npm UNMET PEER DEPENDENCY](http://stackoverflow.com/questions/35738346/how-to-solve-npm-unmet-peer-dependency) – Mark van Straten Feb 09 '17 at 13:37
  • Yeah! you're right. But there's no answer that could solve my problem. So if you've any suggestion/solution then please let me know. @MarkvanStraten – Showkat Ali Feb 09 '17 at 14:12

3 Answers3

3

This is an issue with beta 30 of the CLI... the temporary fix is to install rxjs globally to resolve the dependency.

npm install rxjs -g

This has been addressed in the repo and will no longer be an issue with the next release.

UPDATE:

From @frankie4fingers in the comments, you may find success using the specific version:

npm install -g rxjs@5.0.1
Brocco
  • 62,737
  • 12
  • 70
  • 76
  • I did this but I still got the following: UNMET PEER DEPENDENCY rxjs@^5.0.1 Even though I got this when I installed based on your comment: /usr/local/lib └─┬ rxjs@5.1.0 └── symbol-observable@1.0.4 – frankie4fingers Feb 09 '17 at 15:25
  • 1
    @frankie4fingers you might want to do `npm install -g rxjs@5.0.1` – Technohacker Feb 09 '17 at 15:28
3

I had the same issue, I was trying to install AngularJS 2 CLI using

npm install -g angular-cli

And I got the following warning and dependency error:

npm WARN deprecated angular-cli@1.0.0-beta.28.3: angular-cli has been renamed to @angular/cli. Please update your dependencies.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/angular-cli
/usr/local/lib
└─┬ angular-cli@1.0.0-beta.28.3 
  └── UNMET PEER DEPENDENCY rxjs@^5.0.1

So I tried to installing using @angular/cli instead of angular-cli and it worked.

npm install -g @angular/cli

rgkobashi
  • 2,551
  • 19
  • 25
1

I'm in exactly the same boat. I had a simple angular-cli repo from a couple of months ago, cloned it to a new machine running OSX Sierra, started getting these peer dependency errors when running npm install.

I've tried a fresh project and I can't even install angular-cli. Have tried installing rxjs globally, and by specific version.

While this posts adds little it is intended as corroborating evidence of the issue, and indication that the issue is likely non OS-specific.

[update] Frustratingly, running npm ls -g shows rxjs@5.0.1 is present.