[英]TypeErrpr: Cannot read property 'includes' of undefined
所以基本上,我正處於一個Ionic項目中,兩周前我們或多或少地成功地遷移到了3.0.0 beta版本。 一切都運轉正常,我可以毫無問題地發展它。
但今天早上,我使用的是Ionic 3 beta CLI,並嘗試安裝ConnectivityService。 它無法在那個版本中運行,所以我執行了一個干凈的離子卸載,然后,一個針對離子@ latest的新安裝。 它給app腳本帶來了依賴性錯誤,所以我使用了以下命令:
npm install --save @ ^ 1.3.1
然后,我再次使用“npm install -g ionic @ latest”。 之后,一切都停止了。 我不能再對離子做任何事了; 我只是繼續犯同樣的錯誤:“TypeErrpr:無法讀取屬性'包括'未定義的'”。 如果我卸載並重新安裝它並不重要; 我無法讓它發揮作用。
你知道這可能導致什么嗎?
編輯:這是我的package.json文件:
{
"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": {}
}
}
}
您的npm包已過期。 我建議安裝npm-check-updates ,然后用'ncu -u'更新你的package.json文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.