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

Cannot set property 'fromString' of undefined #11

Closed
jfelchner opened this issue Apr 8, 2015 · 3 comments
Closed

Cannot set property 'fromString' of undefined #11

jfelchner opened this issue Apr 8, 2015 · 3 comments

Comments

@jfelchner
Copy link

We're trying to deploy to Heroku and for some reason we keep getting this error. Everything builds into dist fine locally and runs locally.

BuildingBuilding.Build failed.
Cannot set property 'fromString' of undefined
TypeError: Cannot set property 'fromString' of undefined

We've tried clearing the Heroku cache but still nothing.

The only thing we're using inlineContent for is this:

var app = new EmberApp({
  inlineContent: {
    'analytics' : {
      file: './analytics.js',
      postProcess: function(content) {
        return content.replace(/\{\{SEGMENT_KEY\}\}/g, config.segmentKey);
      }
    }
  }
});

it was working fine before we upgraded to ember-cli 0.2.2

The full stacktrace given to us by Heroku is as follows:

       TypeError: Cannot set property 'fromString' of undefined
           at InlineContentRenderer.renderScript (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli-inline-content/index.js:81:30)
           at InlineContentRenderer.contentFor (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli-inline-content/index.js:41:23)
           at /tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/lib/broccoli/ember-app.js:1249:49
           at Array.reduce (native)
           at EmberApp.contentFor (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/lib/broccoli/ember-app.js:1248:33)
           at replacement (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/lib/broccoli/broccoli-config-replace.js:68:36)
           at String.replace (native)
           at CustomReplace.processFile (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/lib/broccoli/broccoli-config-replace.js:72:25)
           at CustomReplace.process (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/lib/broccoli/broccoli-config-replace.js:52:10)
           at lib$rsvp$$internal$$tryCatch (/tmp/build_cf0dd66cf1a6dce9411922de861dbcca/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:489:16)

Thanks for taking the time to look at this!

@gpoitch
Copy link
Owner

gpoitch commented Apr 8, 2015

@jfelchner try updating this addon to the latest version (0.4.0). Looks like you are using an old version. I see a method in the stack trace that has since been refactored out.

@jfelchner
Copy link
Author

@gdub22 we fixed it by adding:

minifyJS: {
  options: {}
}

to our EmberApp initializer. I'll let you know if the new version works without it whenever we upgrade.

@gpoitch
Copy link
Owner

gpoitch commented Apr 8, 2015

Yea, definitely resolved in the latest version which removed directly minifying inline content in favor of a separate addon.

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

2 participants