gpt4 book ai didi

ionic-framework - 如何将 ionic-native 更新到 vers 3x?

转载 作者:行者123 更新时间:2023-12-04 07:14:44 25 4
gpt4 key购买 nike

我正在尝试将 ionic-native 更新到 3.4.3 版

但它不起作用。它已更新到版本 2.9.0,这是最后一个 2.x 版本。

我怎样才能更新更多?

如果我将 package.json 中的版本更改为 3.4.3,它会说:

npm ERR! notarget No compatible version found: ionic-native@3.4.3
npm ERR! notarget Valid install targets:
npm ERR! notarget 2.9.0, 2.8.1, 2.8.0, 2.7.0, 2.6.0, 2.5.1, 2.5.0, 2.4.1, 2.4.0, 2.3.2, 2.3.1, 2.3.0, 2.2.17, 2.2.16, 2.2.15, 2.2.14, 2.2.13, 2.2.12, 2.2.11, 2.2.10, 2.2.9, 2.2.8, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.3.27, 1.3.26, 1.3.25, 1.3.24, 1.3.23, 1.3.22, 1.3.21, 1.3.20, 1.3.19, 1.3.18, 1.3.17, 1.3.16, 1.3.15, 1.3.14, 1.3.13, 1.3.12, 1.3.11, 1.3.10, 1.3.9, 1.3.8, 1.3.7, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.12, 1.0.11, 1.0.10, 1.0.9, 1.0.8, 1.0.7

你知道为什么吗?

我的 ionic 版本:
Cordova CLI: 6.5.0 
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.2.3
ios-deploy version: 1.9.1
ios-sim version: 5.0.13

谢谢

编辑:

包.json:
  "dependencies": {
"@angular/common": "^4.0.1",
"@angular/compiler": "4.0.1",
"@angular/compiler-cli": "4.0.1",
"@angular/core": "^4.0.1",
"@angular/forms": "4.0.1",
"@angular/http": "4.0.1",
"@angular/platform-browser": "4.0.1",
"@angular/platform-browser-dynamic": "4.0.1",
"@angular/platform-server": "4.0.1",
"@ionic-native/core": "^3.4.3",
"@ionic/storage": "^2.0.1",
"chart.js": "^2.4.0",
"ionic-angular": "2.3.0",
"ionic-native": "3.4.3",
"ionicons": "3.0.0",
"midata": "git+https://github.com/i4mi/midata.js.git#v1.4",
"ng2-charts": "^1.4.4",
"pouchdb": "^6.1.0",
"rxjs": "5.2.0",
"zone.js": "0.8.5"
},

编辑2:
"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.1.0",
"@ionic-native/splash-screen": "3.1.0",
"@ionic-native/status-bar": "3.1.0",
"@ionic/storage": "2.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.0.0",
"typescript": "2.2.2"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard",
"ionic-plugin-keyboard@~2.2.1",
"cordova-plugin-whitelist@1.3.1",
"cordova-plugin-console@1.0.5",
"cordova-plugin-statusbar@2.2.1",
"cordova-plugin-device@1.1.4",
"cordova-plugin-splashscreen@~4.0.1",
"cordova-plugin-screen-orientation",
"cordova-plugin-camera",
"cordova-plugin-inappbrowser",
"cordova-plugin-network-information",
"cordova-sqlite-storage",
"cordova-sqlite-storage@~2.0.2",
"cordova-plugin-file",
"cordova-plugin-secure-storage"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "OnkoApp2: An Ionic project"
}

最佳答案

更新

您必须将所有 native 软件包更新为最新版本,如下所示。

  "@ionic-native/core": "3.4.3",
"@ionic-native/splash-screen": "3.4.3",
"@ionic-native/status-bar": "3.4.3",

之后: npm i
旧答案

您只需在 package.json 上执行此操作文件。

用这个 "ionic-native": "2.2.11" 替换旧的 ( "@ionic-native/core": "3.1.0", )

在那之后运行 npm i
注:您必须使用 "@angular/core": "2.4.8"与您的 Ionic2申请号 Angular4支持呢。

您的 package.json文件应该是这样的。
"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.1.0",
"@ionic-native/splash-screen": "3.1.0",
"@ionic-native/status-bar": "3.1.0",
"@ionic/storage": "2.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"

},

关于ionic-framework - 如何将 ionic-native 更新到 vers 3x?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43117086/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com