So basically, I'm in an Ionic project, which we succesfully migrated to the 3.0.0 beta version, more or less, two weeks ago. Everything was working properly and I could develop over it without problem.
But this morning, I was using the Ionic 3 beta CLI, and tried to install the ConnectivityService. It couldn't work in that version, so I performed a clean uninstall of ionic, and then, a new install aiming to ionic@latest. It gave a dependency error on app-scripts, so I used the following command:
npm install --save @^1.3.1
Then, I used again "npm install -g ionic@latest". After that, everything stopped working. I can't do anything with ionic anymore; I just keep having the same error with whatever I do: "TypeErrpr: Cannot read property 'includes' of undefined". It doesn't matter if I uninstall it and install it again; I just can't get it working.
Do you know what might be causing this?
EDIT: This is my package.json file:
{
"name": "myApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/splash-screen": "^3.5.0",
"@ionic-native/status-bar": "3.4.2",
"@ionic/app-scripts": "^1.3.1",
"@ionic/storage": "2.0.1",
"cordova-plugin-whitelist": "^1.3.1",
"image-manipulation": "0.0.4",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"parse": "^1.9.2",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1",
"@ionic/cli-plugin-cordova": "0.0.12",
"@ionic/cli-plugin-ionic-angular": "0.0.6"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
}
}
}
Your npm packages are out of date. I would recommend installing npm-check-updates and then update your package.json file with 'ncu -u'.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.