我开始感到绝望,我有我的小Angular 6应用程序。我已经从angularfire2 v3升级到@ angular / fire
根据从v4到v5的升级,我进行了所有更改(使用并包括了与之对应的AngularFire库),并删除了所有AngularFireObservables / Objects
我仍然有编译错误:
...
ERROR in Cannot read property 'getSymbolByModule' of undefined
ERROR in D:/Code/workouttracker/src/app/app.routes.ts (70,22): Generic type 'Mod
uleWithProviders<T, any>' requires 2 type argument(s).
ERROR in D:/Code/workouttracker/src/app/service/user.service.ts (27,24): 'fireba
se' refers to a UMD global, but the current file is a module. Consider adding an
import instead.
D:/Code/workouttracker/src/app/service/user.service.ts (28,27): 'firebase' refer
s to a UMD global, but the current file is a module. Consider adding an import i
nstead.
D:/Code/workouttracker/src/app/service/user.service.ts (34,26): 'firebase' refer
s to a UMD global, but the current file is a module. Consider adding an import i
nstead.
D:/Code/workouttracker/src/app/service/user.service.ts (39,26): 'firebase' refer
s to a UMD global, but the current file is a module. Consider adding an import i
nstead.
ERROR in D:/Code/workouttracker/src/app/service/authguard.service.ts (8,31): Can
not find name 'AngularFireAuth'.
D:/Code/workouttracker/src/app/service/authguard.service.ts (12,14): Cannot find
name 'Observable'.
ERROR in D:/Code/workouttracker/src/app/login/login.component.ts (19,20): Proper
ty 'subscribe' does not exist on type 'Auth'.
ERROR in (webpack)-dev-server/client/socket.js
Module not found: Error: Can't resolve 'sockjs-client' in 'D:\Code\workouttracke
r\node_modules\webpack-dev-server\client'
@ (webpack)-dev-server/client/socket.js 1:13-37
@ (webpack)-dev-server/client?http://localhost:4200
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
我一直尝试使用不同版本的firebase和@ angular / fire,我完全删除了node_modules并通过npm install重新安装,这是我当前的package.json
{
"name": "workouttracker",
"version": "0.1.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.0",
"@angular/common": "^6.1.0",
"@angular/compiler": "^6.1.0",
"@angular/core": "^6.1.0",
"@angular/fire": "^5.0.2",
"@angular/forms": "^6.1.0",
"@angular/http": "^6.1.0",
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"core-js": "^2.5.4",
"firebase": "^5.5.1",
"rxjs": "~6.2.0",
"strip-ansi": "^4.0.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
有什么想法吗?也许你有类似的东西。
角度:6 角CLI:1.0.0 节点JS:8.12.0