Ionic 2 final upgrade has unmet peer dependencies

When trying to upgrade a RC5 project to Ionic 2 final, I am getting the following output when running npm i after getting rid of the old node_modules directory:

├─┬ angular-cli@1.0.0-beta.22-1 
│ ├─┬ @angular-cli/ast-tools@1.0.16 
│ │ ├── denodeify@1.2.1 
│ │ ├── minimist@1.2.0 
│ │ ├─┬ mkdirp@0.5.1 
│ │ │ └── minimist@0.0.8 
│ │ ├── rxjs@5.1.0 
│ │ ├── source-map@0.5.6 
│ │ ├── source-map-support@0.4.11 
│ │ ├── symbol-observable@1.0.4 
│ │ ├── tsickle@0.2.5 
│ │ └── typescript@2.0.10 
│ ├── @angular-cli/base-href-webpack@1.0.16 
│ ├── UNMET PEER DEPENDENCY @angular/compiler@2.2.3
│ ├── UNMET PEER DEPENDENCY @angular/compiler-cli@2.2.3
│ ├── UNMET PEER DEPENDENCY @angular/core@2.2.3
│ ├── UNMET PEER DEPENDENCY @angular/tsc-wrapped@^0.5.0
...
│ ├─┬ UNMET PEER DEPENDENCY webpack@2.1.0-beta.25
...
├── UNMET PEER DEPENDENCY tslint@^4.0.0
...
npm WARN codelyzer@2.0.0-beta.4 requires a peer of tslint@^4.0.0 but none was installed.
npm WARN extract-text-webpack-plugin@2.0.0-rc.2 requires a peer of webpack@^2.2.0 but none was installed.
npm WARN string-replace-loader@1.0.5 requires a peer of webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta but none was installed.
npm WARN sass-loader@3.2.3 requires a peer of webpack@^1.12.6 || ^2.1.0-beta but none was installed.
npm WARN webpack-dev-server@2.1.0-beta.9 requires a peer of webpack@^2.1.0-beta but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/compiler@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/compiler-cli@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/core@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/tsc-wrapped@^0.5.0 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of webpack@2.2.0 but none was installed.

I added this to the package.json devDependencies: “tslint”: “^4.0.0”

Then after running npm i again, I get this:

npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/compiler@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/compiler-cli@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/core@^2.3.1 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of @angular/tsc-wrapped@^0.5.0 but none was installed.
npm WARN @ngtools/webpack@1.2.6 requires a peer of webpack@2.2.0 but none was installed.
npm WARN extract-text-webpack-plugin@2.0.0-rc.2 requires a peer of webpack@^2.2.0 but none was installed.
npm WARN sass-loader@3.2.3 requires a peer of webpack@^1.12.6 || ^2.1.0-beta but none was installed.
npm WARN string-replace-loader@1.0.5 requires a peer of webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta but none was installed.
npm WARN tslint-loader@2.1.5 requires a peer of tslint@^3.0.0 but none was installed.
npm WARN webpack-dev-server@2.1.0-beta.9 requires a peer of webpack@^2.1.0-beta but none was installed.

The app base has @angular dependencies of 2.2.1, and I’ve been told to use these strictly.

Also, since webpack is not in the package.json devDependencies, should I add it? Has anyone else upgraded from RC5 to final and had these problems?

Mixing angular-cli and ionic seems like a fairly tricky proposition in the first place, but if you are absolutely attached to doing so, see if you can find a version of it that will be satisfied with Angular 2.2.1, because going the other way (finding an Ionic version that will work with 2.3) will require building a time machine.

Hi @rapropos, I am not attached to the angular-cli for this project. So from devDependencies I removed the “angular-cli”: “^1.0.0-beta.22-1”, and npm i runs without problems.
Thanks for your quick reply.
I am now however getting a failing transpile during ionic serve:

[08:20:21]  transpile started ... 
[08:20:58]  typescript: node_modules/@types/lodash/index.d.ts, line: 11444 
            ']' expected. 
... 14 pages of lodash errors ...
[08:20:58]  transpile failed 

This is a different subject. If I can’t fix that then I will open a new topic here later.

The solution to the lodash transpile failure was found here:

Use this in your package.json:
"@types/lodash": "ts2.0",

(answer thanks to arendjantetteroo)

Have you tried uninstalling the ionic cli npm remove -g ionic and then reinstalling with npm install -g ionic (might need sudo)?

This is required for the latest RCs and Final.

I was told the [change log] was the official source for upgrade info. But there was nothing for final, so since my project was at RC5, I followed the instructions for upgrade to RC6:

npm install --save --save-exact ionic-angular@2.0.0-rc.6

I did that without the -rc.6 (and the @import “ionic.ionicons”) change.

@maninak, what is the source you use for upgrade information?

The same official sources, changelog at the ionic repo.

As you can see I am refering to the global package ionic as denoted from the -g flag. This is different from your project’s dependencies as specified in package.json and is called whenever you invoke ionic commands from your cli such as ionic serve etc.