question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Defining a property on an Ember Component named "container" causes an exception in Production build of Ember

See original GitHub issue

Hi All,

I recently encountered an issue when upgrading from Ember 2.9.1 to 2.13.0. I didn’t see anything the Ember guides or docs about this, but please correct me if I missed it. It seems when you add a “container” property to a component you get the following error - only when serving your app with the production build of Ember . If this is not documented I would be happy to contribute. It seems we could also handle the exception with a more informative message to track down the source of the bug.

I was able to track down the source with the help of this SO post https://stackoverflow.com/questions/35155198/how-solve-this-using-the-injected-container-is-deprecated-ember-2-3.

I’ve put together a demo repo with Ember 2.13 that reproduces the bug. https://github.com/hudakdidit/ember-container-property-production-bug

To reproduce you can run ember build --environment production and put the dist folder on a running server or run a local node server like http-server.

vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:12 TypeError: Cannot read property '__container__' of undefined
    at a.get (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:8)
    at R (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:12)
    at A (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:12)
    at e.H.applyPartial (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:12)
    at Function.a.proto (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:16)
    at new a (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:15)
    at Function.u.create (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:16)
    at e.create (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:8)
    at r.create (vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:10)
    at vendor-35d6ff4933cc1e156ce04e2c2d52162f.js:4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
GavinJoycecommented, Oct 16, 2017

Interestingly, a production build of https://github.com/hudakdidit/ember-container-property-production-bug seems to work in Ember 2.15 and 2.16, but not 2.13 or 2.14. Upgrading to 2.15 might be a good path

0reactions
jonathanhudakcommented, Oct 9, 2018

Upgrading seems a like a totally valid path to resolve the issue. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application - 4.9 - Ember API Documentation
Each Ember app has one and only one Application object. Although Ember CLI creates this object implicitly, the Application class is defined in...
Read more >
The 8 Most Common Mistakes That Ember.js Developers Make
Common Mistake No. 2: Forgetting That Route-driven Controllers Are Singletons ... Routes in Ember.js set up properties on controllers that serve as the...
Read more >
Read ember 101 - Leanpub
This book covers the basic features to help you build Ember applications. ... In our example, the component required a property called “model”...
Read more >
Ember.js - Wikipedia
Ember.js is an open-source JavaScript web framework that utilizes a component-service pattern. It allows developers to create scalable single-page web ...
Read more >
ES Classes in Ember.js - Medium
Computed Properties. The @computed decorator was one of the very first demos of how decorators could be used in Ember. Early examples and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found