当我尝试使用Firebase创建Angular 2项目时,我遇到了下一个问题。
当我键入' npm start'
tester@0.0.0 start /home/leanvitale/Documents/Angular 2/Practicas/tester
enter code hereng serve
Environment configuration does not contain "environmentSource" entry.
A new environmentSource entry replaces the previous source entry inside environments.
To migrate angular-cli.json follow the example below:
Before:
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
After:
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
npm ERR! Linux 4.9.0-deepin4-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tester@0.0.0 start: `ng serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tester@0.0.0 start script 'ng serve'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tester package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs tester
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls tester
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-05-09T23_48_40_960Z-debug.log
这是我的信息:
ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.0.3
node: 7.10.0
os: linux x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/cli: 1.0.3
@angular/compiler-cli: 2.4.10
昨天我按照教程使用Angular 4和Firebase,我做了依赖项更新,并注意到几乎没有文档工作我决定从Angular 2和Firebase开始。问题是我是lio的节点和npm的版本,消毒和安装一切,我错了,现在我不能在Angular 2中运行默认程序,我想如果有人可以指导我卸载和安装所有内容在Angular 2和Firebase中执行项目需要什么。
有人指导我吗? 谢谢!
答案 0 :(得分:0)
抱歉,但不行,现在说:
WARNING in ./~/angularfire2/angularfire2.js
3:26-40 "export 'InjectionToken' was not found in '@angular/core'
WARNING in ./~/angularfire2/app/firebase.app.module.js
3:40-54 "export 'InjectionToken' was not found in '@angular/core'
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/angularfire2/app/firebase.app.module.d.ts (1,10): Module '"/home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/@angular/core/index"' has no exported member 'InjectionToken'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/angularfire2/angularfire2.d.ts (3,10): Module '"/home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/@angular/core/index"' has no exported member 'InjectionToken'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (6,1): Cannot find name 'describe'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (7,3): Cannot find name 'beforeEach'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (16,3): Cannot find name 'it'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (19,5): Cannot find name 'expect'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (22,3): Cannot find name 'it'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (25,5): Cannot find name 'expect'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (28,3): Cannot find name 'it'.
ERROR in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.component.spec.ts (32,5): Cannot find name 'expect'.
ERROR in Error encountered resolving symbol values statically. Calling function 'InjectionToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol FirebaseAppConfigToken in /home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/angularfire2/app/firebase.app.module.d.ts, resolving symbol FirebaseAppConfigToken in /home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/angularfire2/app/index.d.ts, resolving symbol AngularFireModule.initializeApp in /home/leanvitale/Documents/Angular 2/Practicas/tester/node_modules/angularfire2/angularfire2.d.ts, resolving symbol AppModule in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.module.ts, resolving symbol AppModule in /home/leanvitale/Documents/Angular 2/Practicas/tester/src/app/app.module.ts
webpack: Failed to compile.