angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

UNMET PEER DEPENDENCY rxjs@^5.0.1 during npm install 1.0.0-beta.28.3

Open alaindeurveilher opened this issue 9 years ago • 27 comments

Hi, I am trying to update my angular-cli, but I get this error during the installation, I don't know who's responsible for it (angular-cli or angular): UNMET PEER DEPENDENCY rxjs@^5.0.1

OS?

  • Windows 7
  • Mac OSX (El Capitan)

Versions.

angular-cli: 1.0.0-beta.28.3 node: 7.2.1 os: win32 x64

Repro steps.

Reproducible on 2 machines (Mac and Windows) during npm install -g angular-cli@latest which is supposed to install with version of angular 2.4.5

The log given by the failure.

  +-- [email protected]
  +-- UNMET PEER DEPENDENCY rxjs@^5.0.1
  +-- [email protected]

...

npm WARN @angular/[email protected] requires a peer of rxjs@^5.0.1 but none was installed.

Mention any other details that might be useful.

When I install manually npm install -g rxjs it correctly installs rxjs

`-- [email protected]
  `-- [email protected]

alaindeurveilher avatar Feb 02 '17 15:02 alaindeurveilher

it is a warning not an error. It all has to do with how the cli configures its dependencies and is something you will only get when installing globally as when you install locally your project will include rxjs. It should not affect the cli's ability to function

deebloo avatar Feb 02 '17 15:02 deebloo

OK, sorry for the ticket then. Can be closed if there nothing to do with it then. Thank you for the info anyway.

alaindeurveilher avatar Feb 02 '17 15:02 alaindeurveilher

Another point just to make you aware is that the cli has recently changed project names when installing from npm to get the latest beta.29 do the following:

npm uninstall -g angular-cli
npm cache clear
npm install -g @angular/cli

RicardoVaranda avatar Feb 02 '17 15:02 RicardoVaranda

Yes I just realised that when running the ng serve command through the forewarning message :-) Thanks a lot, I appreciate your concern.

alaindeurveilher avatar Feb 02 '17 15:02 alaindeurveilher

I actually just got this issue from a fresh install. The homepage seems to say to use the old version (angular-cli) -- https://cli.angular.io/. But I got the deprication warning from the command line and followed similar steps to what you outlined @RicardoVaranda. However, now when I try to run ng help from any arbitrary point in my terminal, I get outcome that looks like this...

user-33:workspace user.user$ npm install -g @angular/cli
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
/usr/local/lib
└─┬ @angular/[email protected]
  └── UNMET PEER DEPENDENCY rxjs@^5.0.1

npm WARN @angular/[email protected] requires a peer of rxjs@^5.0.1 but none was installed.
user-33:workspace user.user$ ng help
Cannot find module 'rxjs/Subject'
Error: Cannot find module 'rxjs/Subject'

Followed by a very verbose stack trace. I wound up editing out my real name and substituting 'user', but otherwise that is how it reads.

JediSange avatar Feb 02 '17 19:02 JediSange

Update here: It looks like it only happens on ng help. My issue is summarized by #4363.

JediSange avatar Feb 02 '17 20:02 JediSange

ditto @JediSange

didymu5 avatar Feb 03 '17 07:02 didymu5

I also have UNMET PEER DEPENDENCY rxjs@^5.0.1 issue

└─┬ @angular/[email protected] ├─┬ [email protected] │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├── UNMET PEER DEPENDENCY rxjs@^5.0.1 └─┬ [email protected] └── [email protected]

eaktadiur avatar Feb 06 '17 11:02 eaktadiur

Same here. As a result every usage of RXJS in our project leads to an error because of the missing dependency. As a workaround we switched back to 1.0.0-beta.26 for the moment.

kimwer avatar Feb 06 '17 12:02 kimwer

Or, as a workaround, you can install rxjs globally prior to @angular/cli and still benefit from the new module.

alaindeurveilher avatar Feb 06 '17 13:02 alaindeurveilher

I tried 'npm install -g rxjs ' before or after 'npm install -g @angular/[email protected]', both can't solve the issue >>> └─┬ @angular/[email protected] └── UNMET PEER DEPENDENCY rxjs@^5.0.1

vivian7169 avatar Feb 06 '17 15:02 vivian7169

I have the same issue. I was trying to update my angular-cli to the latest version by uninstalling the pervious version and installing the new one via npm i -g @angular/cli. The installation ends with a warning. However, if I then list my global packages using npm list -g --depth=0 I get the following error:

npm ERR! peer dep missing: rxjs@^5.0.1, required by @angular/[email protected]
npm ERR! extraneous: [email protected] /usr/local/lib/node_modules/@angular/cli/node_modules/@angular-cli/ast-tools/node_modules/tsickle

I also can't run ng help which results in the following error:

Cannot find module 'rxjs/symbol/observable'
Error: Cannot find module 'rxjs/symbol/observable'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
...

So essentially the angular-cli doesn't work globally right now. It works locally when I execute it using ./node_modules/angular-cli/bin/ng serve.

d3lm avatar Feb 08 '17 14:02 d3lm

anyone figure out this issue?

reminvestor avatar Feb 09 '17 20:02 reminvestor

@reminvestor There was actually a commit that fixed the unmet peer dependency error. However, if you update to the latest version you'll probably run into different errors. But give it a try. I have already filed a new issue for beta.31 https://github.com/angular/angular-cli/issues/4583

d3lm avatar Feb 10 '17 09:02 d3lm

Fixed in beta.31.

filipesilva avatar Feb 10 '17 10:02 filipesilva

@filipesilva Hi. I installed the latest angular-cli (@angular/[email protected]). Now I can not see 'unmet peer dependency [email protected]' but it shows now " @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 ├── UNMET PEER DEPENDENCY @angular/compiler-cli@^2.3.1 || >=4.0.0-beta <5.0.0 ├── UNMET PEER DEPENDENCY @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 ├── UNMET PEER DEPENDENCY @angular/tsc-wrapped@^0.5.0"

i am using node version 7.5.0 and my npm version is 4.1.2

is that okay?

sooyoung32 avatar Feb 12 '17 14:02 sooyoung32

@sooyoung32 You should have read the comments before posting. You would have noticed then that @d3lm already pointed that out, and following the link you would have realised that the point is already covered in the issue #4575 :-)

alaindeurveilher avatar Feb 12 '17 21:02 alaindeurveilher

The answer by RicardoVaranda works perfectly:

1 step: npm uninstall -g angular-cli 2 step: npm clear cache 3 step: npm install -g @angular/cli

AntonioNieto92 avatar Feb 26 '17 18:02 AntonioNieto92

Minor note: npm cache clear. So:

npm uninstall -g angular-cli
npm cache clear
npm install -g @angular/cli

davidlwatsonjr avatar Feb 27 '17 21:02 davidlwatsonjr

Ok. I follow the steps

npm uninstall -g angular-cli
npm cache clear
npm install -g @angular/cli

and in my case the problem of cli to ionic 2 still persists, any suggestions? I need to run the command and I can not get past it: npm install angularfire2 firebase --save

dannyserena avatar Apr 22 '17 03:04 dannyserena