Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alaindeurveilher opened this issue Feb 2, 2017 · 27 comments
Closed

Comments

@alaindeurveilher
Copy link

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

@deebloo
Copy link
Contributor

deebloo commented Feb 2, 2017

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

@alaindeurveilher
Copy link
Author

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

@RicardoVaranda
Copy link
Contributor

RicardoVaranda commented Feb 2, 2017

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

@alaindeurveilher
Copy link
Author

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

@JediSange
Copy link

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
Copy link

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

@didymu5
Copy link

didymu5 commented Feb 3, 2017

ditto @JediSange

@eaktadiur
Copy link

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]

@kimwer
Copy link

kimwer commented Feb 6, 2017

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.

@alaindeurveilher
Copy link
Author

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

@vivian7169
Copy link

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

@d3lm
Copy link
Contributor

d3lm commented Feb 8, 2017

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.

@reminvestor
Copy link

anyone figure out this issue?

@d3lm
Copy link
Contributor

d3lm commented Feb 10, 2017

@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 #4583

@filipesilva
Copy link
Contributor

Fixed in beta.31.

@sooyoung32
Copy link

@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?

@alaindeurveilher
Copy link
Author

@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 :-)

@AntonioNieto92
Copy link

AntonioNieto92 commented Feb 26, 2017

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

@davidlwatsonjr
Copy link

davidlwatsonjr commented Feb 27, 2017

Minor note: npm cache clear. So:

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

@dannyserena
Copy link

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

@befikirhm
Copy link

befikirhm commented Apr 26, 2017

Changing the "target" on tsconfig.json from "es5" to "es6" solved my problem.

@SebastienCoste
Copy link

SebastienCoste commented May 17, 2017

When I have an unmet peer dependency on packX while installing packY I add packX like this and everything works :

sudo npm install -g grunt-cli bower yo packX packY

@maiasmith
Copy link

running npm update in the same directory as my package.json worked for me.

@agrpriyal
Copy link

agrpriyal commented Jul 27, 2017

i was facing unmet peer dependancy of rxjs and zone.js .
This issue got resolved for me. Steps I followed:

  1. npm update
  2. npm -g ls --depth=0 and npm ls --depth=0 and compare them
  3. removed the angular/core because that was not required for my project. i just needed angular cli.
  4. repeated the second step again and all the issues got resolved.

@ketansahils
Copy link

It is quite strange that to update angular cli, we uninstall it first, clear cache and wait for an excruciatingly long time to install it again.

@amritsubedi
Copy link

I got the same error over and over while trying to install ionic. This hopefully works for angular/cli too.
I resolved it by following:

  1. npm install -g rxjs@6
  2. npm run reinstall

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests