我只是upgraded an ember-cli app from 0.0.40 to 0.1.2。
在关注此upgrade guide并尽可能地升级所有插件后,转换器似乎在会徽文件上进行了barf:
➜ participate-frontend git:(upgrade-cli) ✗ ember build
version: 0.1.2
Build failed.
File: participate-frontend/templates/alert.js
Line 1: Unexpected identifier
Error: Line 1: Unexpected identifier
at throwError (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:2579:21)
at throwUnexpected (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:2623:13)
at expect (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:2650:13)
at parseArrayInitialiser (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:2783:21)
at parsePrimaryExpression (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:3076:20)
at /Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:5661:38
at trackLeftHandSideExpressionAllowCall (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:5563:61)
at parsePostfixExpression (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:3214:20)
at /Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:5661:38
at parseUnaryExpression (/Users/work/Projects/participate-frontend/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/node_modules/es6-module-transpiler/dist/es6-module-transpiler.js:3278:16)
关于可能导致此问题或者如何调试此问题的任何想法?
答案 0 :(得分:1)
我自己遇到了错误,它看起来是由于ember-template-compiler模块更新为broccoli-emblem-compiler的一部分。根据此讨论https://github.com/stefanpenner/ember-cli/issues/2357
我是节点模块管理的新手,但我做了以下工作,将broccoli-emblem-compiler的依赖关系与较旧版本的ember-template-compiler挂钩。
有点沉重,但这是强制broccoli-emblem-compiler在我的机器上使用旧版本的ember-template-compiler的唯一方法。