我有这条警告信息 每当我尝试安装任何插件,如
npm install slick-carousel --save
我曾尝试过这样做 -
https://ionicframework.com/docs/developer-resources/using-npm/
删除并使用最新的 -
http://devfanaticblog.com/how-to-update-ionic-2-cli-and-libraries/
并按照步骤,但对我没有任何意义。
也尝试手动更新,但....!
这是本地设置 -
******************************************************
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************
这是package.json--
{
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@ionic/storage": "^2.0.1",
"es6-shim": "^0.35.0",
"file-saver": "^1.3.3",
"ionic-angular": "2.0.0-beta.10",
"ionic-native": "1.3.2",
"ionicons": "3.0.0",
"jquery": "^3.2.1",
"jquery-touchswipe": "^1.6.15",
"ng2-breadcrumb": "^0.5.6",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"slick-carousel": "^1.6.0",
"zone.js": "^0.6.12"
},
"devDependencies": {
"@types/file-saver": "0.0.1",
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "2.0.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^2.0.0",
"ionic-gulp-tslint": "^1.0.0",
"run-sequence": "1.1.5",
"tslint-ionic-rules": "^0.0.3"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"cordova-plugin-inappbrowser",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
},
"android",
{
"platform": "android",
"version": "",
"locator": "android"
}
],
"name": "app name",
"description": "An Ionic project"
}
任何人都可以帮我这样做!
答案 0 :(得分:1)
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3"
这部分是你的问题 - 你依赖Angular 2.0 RC3(非常老的),而其他一些包需要当前版本的4.2.5。
将这些行更改为:
"@angular/common": "4.2.5",
"@angular/compiler": "4.2.5",
"@angular/core": "4.2.5",
"@angular/forms": "4.2.5",
"@angular/http": "4.2.5",
"@angular/platform-browser": "4.2.5",
"@angular/platform-browser-dynamic": "4.2.5",
"@angular/router": "4.2.5",