After updating ember-cli from 0.4.4 to 0.4.6 (also ran ember init…) I get the following error when trying ember server:
Line 3: Unexpected token :
Error: Line 3: Unexpected token :
at throwError (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:2131:21)
at throwUnexpected (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:2193:9)
at consumeSemicolon (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:2284:13)
at parseStatement (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:4147:9)
at parseStatement (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:4142:27)
at parseSourceElement (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:4669:20)
at parseStatementList (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:3314:25)
at parseBlock (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:3329:17)
at parseStatement (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:4084:24)
at parseSourceElement (my-project\node_modules\ember-cli\node_modules\broccoli-es3-safe-recast\node_modules\es3-safe-recast\node_modules\esprima\esprima.js:4669:20)
After a lot of researching I found that the problem is my initializer for a service:
export default {
name: 'growl-service',
initialize: function(container, app) {
app.inject('controller', 'growl', 'service:growl');
}
};
If I comment out everything except the name, it starts the server fine, but obviously it fails an assert…
Any idea on what I’m doing wrong?