Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transpiler error #49

Open
tehmaestro opened this issue Jul 5, 2017 · 0 comments
Open

Transpiler error #49

tehmaestro opened this issue Jul 5, 2017 · 0 comments

Comments

@tehmaestro
Copy link

tehmaestro commented Jul 5, 2017

Hi, I just upgraded to Ember 2.13 from 2.8, updated a bunch of dependencies together with this plugin.
When I try to build for production, I get a very long error which starts with:

broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy: (babel) => {
 const t = babel.types
 // cache for performance
 const parseMap = {}
 return {
   visitor: {
     Identifier(path, state) {
       if (path.parent.type === 'MemberExpression') {
         return;
       }
       if (path.parent.type === 'ClassMethod') {
         return;
       }
       if (path.isPure()) {
         return;
       }
       if (!state.opts.hasOwnProperty(path.node.name)) {
         return;
       }
       let replacementDescriptor = state.opts[path.node.name]
       if (replacementDescriptor === undefined || replacementDescriptor === null) {
         replacementDescriptor = t.identifier(String(replacementDescriptor))
       }
//.....

 Property key of ObjectProperty expected node to be of a type ["Identifier","StringLiteral","NumericLiteral"] but instead got "BooleanLiteral"

    at File.transform (node_modules\ember-cli-conditional-compile\node_modules\babel-core\lib
\transformation\file\index.js:548:35)
    at node_modules\ember-cli-conditional-compile\node_modules\babel-core\lib\transformation\
pipeline.js:50:19
    at File.wrap (node_modules\ember-cli-conditional-compile\node_modules\babel-core\lib\tran
sformation\file\index.js:564:16)
    at Pipeline.transform (node_modules\ember-cli-conditional-compile\node_modules\babel-core
\lib\transformation\pipeline.js:47:17)
    at Promise node_modules\ember-cli-conditional-compile\node_modules\broccoli-babel-transp
iler\lib\parallel-api.js:102:26)
    at initializePromise (node_modules\rsvp\dist\rsvp.js:567:5)
    at new Promise (node_modules\rsvp\dist\rsvp.js:1033:31)
    at Object.transformString (node_modules\ember-cli-conditional-compile\node_modules\brocco
li-babel-transpiler\lib\parallel-api.js:101:12)
    at Babel.transform (node_modules\ember-cli-conditional-compile\node_modules\broccoli-babe
l-transpiler\index.js:80:22)
    at Babel.processString (node_modules\ember-cli-conditional-compile\node_modules\broccoli-
babel-transpiler\index.js:180:15)
    at Promise.then.result.output (node_modules\broccoli-persistent-filter\lib\strategies\per
sistent.js:41:23)

I don't really know what do to. I tried uninstalling this addon, and the build was successful.

UPDATE

I have a property in one of my services, named exactly the same as the feature flag.

  export default Ember.Service.extend({
    myFeatureFlag: function() {
       return config.featureFlags && config.featureFlags.myFeatureFlag
   }.property()
})

If I remove it, or rename the property, it builds (except for the opting out of cache part). Even if I make it myFeatureFlag: true, it still doesn't work. Is this something expected?

NEW UPDATE:

I installed version 1.0.2 of this addon, and it works. 1.0.3 fails. So there seems to be an issue with this pull request: #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant