我正在尝试运行我正在其中使用Firestore的项目,但是我遇到了此错误,因此我无法找到解决方案。因为,每当我在CMD上执行离子服务时,由于出现错误列表,我都无法运行页面,如下图所示:https://imgur.com/a/zyzoXLM。它给我一个错误,说我是我的angularfire2.d.ts问题,这是第一组错误。
关于第二组错误,它说我的firebase.module.d.ts中有问题。
最后这是我在谷歌浏览器上看到的错误列表
Typescript Error
Cannot find module '@angular/core'.
node_modules/@angular/fire/angularfire2.d.ts
import { InjectionToken, NgZone } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
最后:
Typescript Error
Cannot find module 'rxjs'.
/node_modules/@angular/fire/angularfire2.d.ts
添加了Package.json
{
"name": "FirestoreCrud",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "~4.12.0",
"@ionic-native/splash-screen": "~4.12.0",
"@ionic-native/status-bar": "~4.12.0",
"@ionic/storage": "2.1.3",
"firebase": "^5.4.2",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.11",
"rxjs-compat": "^6.3.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.0",
"typescript": "~2.6.2"
},
"description": "An Ionic project"
}
答案 0 :(得分:-1)
检查您的node_modules是否存在以下模块,如果不通过npm安装它们