升级到Ionic 3.2.0

分享于 

1分钟阅读

ionic

  繁體

打开项目package.json,删除所有内容,并复制粘贴以下内容:


"dependencies": {
"@angular/common":"4.1.0",
"@angular/compiler":"4.1.0",
"@angular/compiler-cli":"4.1.0",
"@angular/core":"4.1.0",
"@angular/forms":"4.1.0",
"@angular/http":"4.1.0",
"@angular/platform-browser":"4.1.0",
"@angular/platform-browser-dynamic":"4.1.0",
"@ionic-native/core":"3.6.1",
"@ionic-native/splash-screen":"3.6.1",
"@ionic-native/status-bar":"3.6.1",
"@ionic/storage":"2.0.1",
"ionic-angular":"3.2.1",
"ionicons":"3.0.0",
"rxjs":"5.1.1",
"sw-toolbox":"3.6.0",
"zone.js":"0.8.10"
},
"devDependencies": {
"@ionic/app-scripts":"1.3.7",
"typescript":"2.2.1"
} 

如果使用的是Ionic CLI的版本3,那么你还应该添加这些dev依赖项


"@ionic/cli-plugin-cordova":"1.0.0",
"@ionic/cli-plugin-ionic-angular":"1.0.0",

接下来,你应该删除现有的node_modules目录,并运行:

npm install 

现在你应该能够为你的项目提供

ionic serve 

ION  Ionic  
相关文章