On install of Angular2 RC5 seeing Warnings
[email protected] requires a peer of @angular/[email protected] but none was installed.
Seeing other errors in my app but nothing apparently specific to ng2-bootstrap at the moment.
I am getting an error and am unable to npm install ng2-bootstrap
npm ERR! Linux 3.10.0-229.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package @angular/[email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.5
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.5
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.5
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.5
npm ERR! peerinvalid Peer [email protected] wants @angular/[email protected]
@rashmidixit Your error message says that you just didn't upgrade all the @angular packages:
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.5
It looks like you upgraded @angular/platform-browser, but not the @angular/common
Thanks for your reply @Dinistro - I have updated every dependency (cut pasted from angular website :)) this is my package.json
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "^2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.5",
"angular2-in-memory-web-api": "0.0.15",
@rashmidixit have you ran npm install after updating the dependencies? Do you still get the same error message?
@nicksterx Yes. I removed the node_modules folder completely. Then updated package.json and re-ran npm install. Thats when I get the above error.
I somehow think ng2-bootstrap needs to be updated with dependency on angular common latest rc version. I dont think I can have both versions of common installed in one package right?
I did the same update and I got the same error! I think ng2-bootstrap needs to be updated to the latest RC release. Thanks.
Changing the package.json in \node_modules\ng2-bootstrap\package.json to reference rc.5 works in my case. It's only a temporary solution of course...
The solution proposed by @david-camdzic works ^^
The solution proposed by @david-camdzic worked for me as well. I also had to update several other packages too, for example:
"@angular/forms": "0.3.0",
"@angular/router": "3.0.0-rc.1",
"typings": "1.3.2"
Is anyone who changed the package.json reference to rc.5 seeing any compatibility issues?
@nicksterx yes. seems that pagination bar is broken.
zone.js:461 Unhandled Promise rejection: (SystemJS) Error: Input 'previousText' defined multiple times in 'PagerComponent'
This crashes my whole app at startup. If I remove the page everything is fine.
seems that datepicker is also brocken
Another issue I'm having after upgrading to Angular 2 RC5 is that I need to include viewProviders: [BS_VIEW_PROVIDERS] in my @Component declarations, which gives a warning:
ComponentResolver is deprecated for dynamic compilation. Use ComponentFactoryResolver together with @NgModule/@Component.entryComponents or ANALYZE_FOR_ENTRY_COMPONENTS provider instead. For runtime compile only, you can also use Compiler.compileComponentSync/Async.
I tried putting it in providers in the @NgModule declaration instead, but then I get an error:
Uncaught (in promise): No provider for AppComponent!
I am seeing an error of
Error: Error: Error: Input 'previousText' defined multiple times in 'PagerComponent'
that is preventing my app from executing
Hi all!
As @david-camdzic, @Yoanribeiro and @hassanasad said, the proposal solution works, but it implies modifying manually the plugin. Anyone knows if there is planned a workaround to solve this in the plugin so this plugin can be work on Angular RC5?
I think the only work needed is to upgrade the libraries inside the plugin but I don't if this has any side effect.
Thanks!
@MiguelAngel82 there is a pull request in progress to update the plugin to RC5 https://github.com/valor-software/ng2-bootstrap/pull/864
Thank you very much @nicksterx! We'll wait the merge of this PR :)
@valorkin close?
Most helpful comment
Another issue I'm having after upgrading to Angular 2 RC5 is that I need to include
viewProviders: [BS_VIEW_PROVIDERS]in my@Componentdeclarations, which gives a warning:I tried putting it in
providersin the@NgModuledeclaration instead, but then I get an error: