在我尝试升级Angular CLI、Ionic和cordova后,Ionic模块出现问题



我试图升级我的Angular CLI、Ionic和Cordova版本,现在我不能再运行我的Ionic服务了,当我试图取消所有版本并安装旧版时,我总是会收到一个错误,但有点不同。

现在我得到了:

Module '"C:/Users/mylaptop30/Desktop/ArbesTech-Projects/Andrian/InstantDealNew/node_modules/firebase/index"' has no exported member 'functions'.

我的版本是:Ionic@3.9.2Cordova 8.1.2(Cordova-lib@8.1.1)Angular 6.4.1.

在我尝试玩我的火球版本之前,我得到了:

cannot find module firebase/app

当我尝试升级我的Angular CLI时,我得到了:

Cannot redeclare block-scoped variable 'ngDevMode'

我在互联网上搜索了每一个错误的解决方案,但当我修复一个错误时,就会出现另一个错误。请帮帮我!!!

这是我的Package.json文件:

"name": "Instant Deal",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "^5.0.3",
"@angular/compiler": "^5.0.3",
"@angular/compiler-cli": "^5.0.3",
"@angular/core": "^5.0.3",
"@angular/forms": "^5.0.3",
"@angular/http": "^5.0.3",
"@angular/platform-browser": "^5.0.3",
"@angular/platform-browser-dynamic": "^5.0.3",
"@ionic-native/camera": "^4.7.0",
"@ionic-native/contacts": "^4.5.2",
"@ionic-native/core": "4.7.0",
"@ionic-native/facebook": "4.5.2",
"@ionic-native/file": "^4.5.2",
"@ionic-native/firebase": "4.5.2",
"@ionic-native/geolocation": "^4.5.2",
"@ionic-native/google-plus": "^4.5.2",
"@ionic-native/keyboard": "^4.5.2",
"@ionic-native/media-capture": "^4.5.2",
"@ionic-native/social-sharing": "^4.15.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "^4.7.0",
"@ionic/storage": "2.1.3",
"android": "0.0.8",
"angularfire2": "^5.0.0-rc.4",
"cordova-browser": "5.0.4",
"cordova-ios": "^4.5.5",
"cordova-plugin-accountkit": "^1.4.0",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-contacts": "^2.3.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-facebook4": "^1.10.1",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-googleplus": "^5.3.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-media-capture": "^1.4.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.1",
"es6-promise-plugin": "^4.2.2",
"firebase": "^4.8.0",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"moment": "^2.22.1",
"node-sass": "^4.9.0",
"rxjs": "^5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.0",
"typescript": "^2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-contacts": {
"CONTACTS_USAGE_DESCRIPTION": " "
},
"cordova-plugin-media-capture": {
"CAMERA_USAGE_DESCRIPTION": " ",
"MICROPHONE_USAGE_DESCRIPTION": " ",
"PHOTOLIBRARY_USAGE_DESCRIPTION": " "
},
"cordova-plugin-file": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": " "
},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-statusbar": {},
"es6-promise-plugin": {},
"cordova-plugin-facebook4": {

和我的tsconfig.json:

{
"compilerOptions": {
"paths": {
"@angular/*": ["node_modules/@angular/*"]
},
"baseUrl": "src",
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts",
],
"exclude": [
"node_modules",
"src/**/*.spec.ts",
"src/**/__tests__/*.ts"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}

}

尝试删除node_modules文件夹,然后重新安装它们以查看错误是否消失。

rm -rf node_modules
npm install

你的错误到处都是,所以很难确定是什么原因造成的。我认为是许多不同的问题造成的,而不是一个本地化的问题。

尝试在文件夹项目上运行npm rebuild以重建插件

最新更新