我跟着Angularfire2 Installation and Setup(08-21-2016),但是当我输入时,我在终端收到错误:
ng build
这些是错误:
Build error
The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:
SyntaxError: Unexpected token ]
at Object.parse (native)
at BroccoliTypeScriptCompiler._loadTsConfig (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:128:25)
at BroccoliTypeScriptCompiler._createServiceHost (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:163:25)
at BroccoliTypeScriptCompiler.build (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:41:12)
at C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\broccoli-caching-writer\index.js:152:21
at lib$rsvp$$internal$$tryCatch (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1019:11)
at lib$rsvp$asap$$flush (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
The broccoli plugin was instantiated at:
at BroccoliTypeScriptCompiler.Plugin (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\broccoli-plugin\index.js:10:31)
at BroccoliTypeScriptCompiler.CachingWriter [as constructor] (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\broccoli-caching-writer\index.js:21:10)
at BroccoliTypeScriptCompiler (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\broccoli-typescript.js:27:10)
at Angular2App._getTsTree (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\angular2-app.js:331:18)
at Angular2App._buildTree (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\angular2-app.js:124:23)
at new Angular2App (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\lib\broccoli\angular2-app.js:53:23)
at module.exports (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\angular-cli-build.js:10:10)
at Class.module.exports.Task.extend.setupBroccoliBuilder (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\ember-cli\lib\models\builder.js:55:19)
at Class.module.exports.Task.extend.init (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\ember-cli\lib\models\builder.js:89:10)
at new Class (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\core-object\core-object.js:18:12)
at Class.module.exports.Task.extend.run (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\ember-cli\lib\commands\serve.js:64:24
at lib$rsvp$$internal$$tryCatch (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1019:11)
at lib$rsvp$asap$$flush (C:\Users\Marian\Desktop\ng_cli\test_cli_fire\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
修改过的文件:https://github.com/angular/angularfire2/issues/461
存储库:https://github.com/sorcamarian/angularfire2-instalation-errors
我做错了什么或者是错误吗?
谢谢
答案 0 :(得分:2)
由于与当前的angularfire2 beta5不兼容,我将您的回购分叉并卡在npm install
。
由于您的应用程序似乎非常空,我的建议是从头开始并遵循最新的angularfire2指令。它今天(8/29)更新。
答案 1 :(得分:1)
因为很多have encountered this issue,有几个人发布了一些解决方案。
我设法为我和created a repository找到了最佳解决方案。