我想使用Network-information plugin,我有一个旧的离子原生版本。 所以我做了:
npm rm --save ionic native
npm install --save ionic-native@latest
npm update
因为2.2.12.
但现在,当我这样做:ionic serve --watch
控制台抛出:ctorParameters.map不是函数
我的Ionic CLI版本是:2.1.14
我的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",
"angular2-fullcalendar": "^1.1.1",
"angularfire2": "^2.0.0-beta.6-preview",
"firebase": "^3.6.4",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "^2.5.1",
"ionicons": "3.0.0",
"jquery-ui": "^1.12.1",
"rxjs": "5.0.0-beta.12",
"soundcloud": "^3.1.2",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.45",
"typescript": "2.0.6"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"description": "Mindfulness: An Ionic project"
}
任何解决方案?
提前感谢!
编辑:
我已尝试更新为rc4:(2.0.0-rc.4 (2016-12-15))
我使用了更新的指南然后,控制台抛出了我:
A recent change occured in ionic-app-scripts.
Please create a new file "main.ts" containing the content of "main.dev.ts", and then delete the deprecated files.
所以我搜索了一下,我找到了issue
我做了这个步骤,然后当我做:ionic serve --watch
它构建,但app没有加载和控制台抛出:
GET http://localhost:8100/build/main.css (index):33
GET http://localhost:8100/build/main.js (index):45
GET http://localhost:8100/build/main.js 404 (Not Found)(index):45