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.

Yet Another _Ember is undefined error

See original GitHub issue

Before opening this i removed node_modules and yarn.lock so the environment was as clean as possible, just to confirm it was still an issue.

yarn why ember-cli-babel | grep @7                         
=> Found "ember-cli-babel@7.20.5"
=> Found "<internal-module>#ember-power-select#ember-cli-babel@7.20.5"
=> Found "ember-paper#ember-power-select#ember-cli-babel@7.20.5"
=> Found "<internal-module-2>#ember-text-measurer#ember-cli-babel@7.20.5"
=> Found "ember-paper#ember-text-measurer#ember-cli-babel@7.20.5"
=> Found "ember-power-datepicker#ember-power-calendar#ember-cli-babel@7.20.5"
=> Found "<internal-module-2>#ember-concurrency#ember-cli-babel@7.20.5"
=> Found "ember-paper#ember-concurrency#ember-cli-babel@7.20.5"
yarn why babel-plugin-ember-modules-api-polyfill | grep @2 
=> Found "babel-plugin-ember-modules-api-polyfill@2.13.4"
=> Found "ember-data#ember-cli-babel#babel-plugin-ember-modules-api-polyfill@2.13.4"

Still getting Uncaught ReferenceError: _Ember is not defined

From the stack, it looks to be coming out of ember-concurrency

Pre-transpiled

state: computed('isDropped', 'isCanceling', 'hasStarted', 'isFinished', function() {
    if (get(this, 'isDropped')) {
      return 'dropped';
    } else if (get(this, 'isCanceling')) {
      return 'canceled';
    } else if (get(this, 'isFinished')) {
      return 'finished';
    } else if (get(this, 'hasStarted')) {
      return 'running';
    } else {
      return 'waiting';
    }
  }),

Transpiled

state: (_Ember = Ember).computed.apply('isDropped', 'isCanceling', 'hasStarted', 'isFinished', function () {
      if (Ember.get(this, 'isDropped')) {
        return 'dropped';
      } else if (Ember.get(this, 'isCanceling')) {
        return 'canceled';
      } else if (Ember.get(this, 'isFinished')) {
        return 'finished';
      } else if (Ember.get(this, 'hasStarted')) {
        return 'running';
      } else {
        return 'waiting';
      }
    }),

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Jun 3, 2020

You should be able to ensure that ember-data@3.2.0 gets the fixed version of babel-plugin-ember-modules-api-polyfill.

0reactions
rwjbluecommented, Sep 18, 2020

I think this is fixed now (for a while), closing…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ember.Object is `undefined` · Issue #12623 - GitHub
Basically, if ember-template-compiler.js (which only includes ember-metal, and not runtime) is loaded first then ember-runtime modules are ...
Read more >
ember.js - Getting a model is undefined error after upgrading ...
If I change the title attribute to be title={{detailsTitle}} and have a computed property in the component.js file that just returns task.
Read more >
Cannot read property 'get' of undefined - Ember.JS
Hello everyone! I created a purchases controller to take data from user input, but I have an error; routes/purchases.js: import Route from ...
Read more >
The 8 Most Common Mistakes That Ember.js Developers Make
The problem was that if the user then switched to another band, the value of songCreationStarted persisted, and it seemed like the half-finished...
Read more >
Converting Your Ember App to TypeScript - Inside Skylight
Updating the rentals type in the arguments interface resolves not only the type-checking error that we've been working on, but also another one ......
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