emberjs/ember-inflector

Unexpected reserved word (loader problems?)

jrhe opened this issue · 7 comments

jrhe commented

When upgrading to the latest version I get the following error. I think it might be to do with the loader like in #40.

import Ember from 'ember';
^^^^^^
Unexpected reserved word
/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-inflector/addon/index.js:3
import Ember from 'ember';
^^^^^^
SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Function.Addon.lookup (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/models/addon.js:671:19)
    at /Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/models/addons-factory.js:43:36
    at visit (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/utilities/DAG.js:23:3)
    at DAG.topsort (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/utilities/DAG.js:82:7)
    at AddonsFactory.initializeAddons (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/models/addons-factory.js:40:9)
    at Project.initializeAddons (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/models/project.js:313:36)
    at Project.eachAddonCommand (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/models/project.js:364:10)
    at module.exports (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/cli/lookup-command.js:46:13)
    at CLI.<anonymous> (/Users/jon/Documents/Devon/occam/frontend/node_modules/ember-cli/lib/cli/cli.js:31:26)```

it ships es6 code, it first needs to be transpiled. If included as an addon into an modern ember-cli based app, this should all just work out of the box.

If not, then that is a bug we will need to fix.

jrhe commented

Wow, super fast reply Stef!

For more context, this is when using ember-cli 0.1.5 but the error also occurred when I updated to the latest ember-cli (0.2.1) so it should be working I think.

For more context, this is when using ember-cli 0.1.5 but the error also occurred when I updated to the latest ember-cli (0.2.1) so it should be working I think.

ya that should work, we will need to dig in.

jrhe commented

Anyway I can help debug this?

@jrhe sure, likely by debugging it. I unfortunately can't give you any further instructions, as I haven't had a chance to debug it myself :trollface:

fixed on master 129d1d6

pending some NPM issues, will release a new versino

published as 1.6