Upgrade to Ionic Native 3.x

Hi all ! How properly upgrade Ionic Native to 3.x ? I am trying … npm install @ionic-native/core --save, but see

`-- UNMET PEER DEPENDENCY @ionic-native/core@3.2.2

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN @ionic-native/background-mode@3.1.1 requires a peer of @ionic-native/co
re@3.1.1 but none was installed.
npm ERR! code 1
1 Like

Same error for me too. Have you found a solution?

You can refer this : http://stackoverflow.com/questions/42949512/ionic-2-native-linkedin-unmet-peer-dependency

sampath, thanks for answer, I see ``-- UNMET PEER DEPENDENCY typescript@2.0.9` and SKIPPING …

It’s safe to ignore these errors, but here’s why it happens and how to get rid of it:

Why it happens: older versions of @ionic-native/* plugins required @ionic-native/core to be the same exact version as the plugin package. This was changed in 3.2.0. The plugin packages are now ok with any version of @ionic-native/core as long as it’s later than 3.1.0. The required version will change if there are any major bug fixes in the core package. So from now on if you get a warning asking you to upgrade your @ionic-native/core package, you should take it seriously.

How to get rid for the warning: simply upgrade all your @ionic-native/* packages to the latest version and that should fix it.

I run Typescript 2.2.2 in my devDependencies

"dependencies": {
"@angular/common": "2.4.8",
"@angular/compiler": "2.4.8",
"@angular/compiler-cli": "2.4.8",
"@angular/core": "2.4.8",
"@angular/forms": "2.4.8",
"@angular/http": "2.4.8",
"@angular/platform-browser": "2.4.8",
"@angular/platform-browser-dynamic": "2.4.8",
"@angular/platform-server": "2.4.8",
"@ionic-native/core": "^3.4.1",
"@ionic-native/splash-screen": "^3.4.1",
"@ionic-native/status-bar": "^3.4.1",
"@ionic/cloud-angular": "^0.11.0",
"@ionic/storage": "^2.0.1",
"chart.js": "^2.5.0",
"distributions": "^1.0.0",
"ionic-angular": "^2.3.0",
"ionicons": "^3.0.0",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"zone.js": "0.7.2"
  },
  "devDependencies": {
"@ionic/app-scripts": "^1.2.2",
"typescript": "^2.2.2"
  }

npm install @ionic-native/core --save always SKIPPING … I am update node_modules but …

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

D:\tmp\>npm install @ionic-native/core --save
ionic-hello-world@ D:\tmp\ionic2\
`-- @ionic-native/core@3.4.1

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

  "dependencies": {
    "@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic-native/core": "^3.4.1",
    "@ionic-native/splash-screen": "^3.4.1",
    "@ionic-native/status-bar": "^3.4.1",
    "@ionic/cloud-angular": "^0.11.0",
    "@ionic/storage": "^2.0.1",
    "chart.js": "^2.5.0",
    "distributions": "^1.0.0",
    "ionic-angular": "^2.3.0",
    "ionicons": "^3.0.0",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.2.2",
    "typescript": "^2.2.2"
  },

Hi all ! Help please upgrade Ionic Native to 3.x ! I am running npm install @ionic-native/core --save, but see …

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

After I am running ionic info and see …

Your system information:

 ordova CLI: 6.4.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.0
Xcode version: Not installed

And now after update node_module to Ionic3 I can not bulid my app … I see …

[13:48:46]  ionic-app-scripts 1.3.0
[13:48:46]  build prod started ...
[13:48:46]  clean started ...
[13:48:46]  clean finished in 1 ms
[13:48:46]  copy started ...
[13:48:46]  ngc started ...
[13:48:49]  ionic-app-script task: "build"
[13:48:49]  Error: Error encountered resolving symbol values statically. Could n
ot resolve ionic-native relative to
            D:/tmp/ionic2/src/app/app.module.ts., resolving sy
mbol AppModule in
            D:/tmp/ionic2/src/app/app.module.ts, resolving sym
bol AppModule in
            D:/tmp/ionic2/src/app/app.module.ts
Error: Error encountered resolving symbol values statically. Could not resolve i
onic-native relative to D:/tmp/ionic2/src/app/app.module.ts.,
resolving symbol AppModule in D:/tmp/ionic2/src/app/app.module
.ts, resolving symbol AppModule in D:/tmp/ionic2/src/app/app.m
odule.ts
    at Error (native)
    at syntaxError (D:\tmp\ionic2\node_modules\@angular\compil
er\bundles\compiler.umd.js:1513:34)
    at simplifyInContext (D:\tmp\ionic2\node_modules\@angular\
compiler\bundles\compiler.umd.js:23316:23)

My package.json is …

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@ionic-native/core": "^3.4.4",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/storage": "2.0.1",
    "ionic-angular": "3.0.1",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "myApp"
}

In Visual Studio Code using VersionLens, you will easy to update all dependencies :slight_smile:

https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens