我已经将ionic2 CLI从2.1.17更新到2.1.18,那么我应该如何升级我使用2.1.17版本构建的现有项目 .
这是离子信息详细信息 - 您的系统信息:
Cordova CLI:6.4.0 Ionic CLI版本:2.1.18 Ionic App Lib版本:2.1.9 ios-deploy版本:未安装ios-sim版本:未安装OS:Linux 4.4节点版本:v6.9.2 Xcode版本:未安装
的package.json
{
"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": "2.1.1",
"@angular/compiler": "2.1.1",
"@angular/compiler-cli": "2.1.1",
"@angular/core": "2.1.1",
"@angular/forms": "2.1.1",
"@angular/http": "2.1.1",
"@angular/platform-browser": "2.1.1",
"@angular/platform-browser-dynamic": "2.1.1",
"@angular/platform-server": "2.1.1",
"@ionic/storage": "1.1.6",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.45",
"typescript": "2.0.6"
},
"cordovaPlugins": [
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"description": "ionic: An Ionic project"
}
1 回答
您的Ionic CLI版本已更新 . 您的项目位于 Ionic 2 RC3 (基于
"ionic-angular": "2.0.0-rc.3",
)而不是2.1.7 . 您当前的项目仍然有效 .如果要将项目升级到当前的RC4版本,最快的方法是查看ionic starter template的package.json文件 . 相应地更新你的package.json . 删除node_modules文件夹 . 终于跑了
检查the readme
另一种方法是简单地执行
ionic start myApp blank --v2
并将src文件夹替换为您的文件夹,并添加您之前项目中的任何其他软件包 .