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

Failure in ember addon with 3.2.0-beta.1 #142

Closed
paulcwatts opened this issue Apr 11, 2018 · 4 comments
Closed

Failure in ember addon with 3.2.0-beta.1 #142

paulcwatts opened this issue Apr 11, 2018 · 4 comments

Comments

@paulcwatts
Copy link

This is using ember-cli==3.1.0, ember-source==3.1.0:

ember addon ember-inflector-bug --yarn
cd ember-inflector-bug
ember install ember-data 
ember try:one ember-beta

The result is:

not ok 1 Chrome 65.0 - Global error: Uncaught TypeError: Cannot read property 'String' of undefined at http://localhost:7357/assets/vendor.js, line 65295
    ---
        Log: |
            { type: 'warn',
              text: '\'WARNING: Library "Ember" is already registered with Ember.\'\n' }
            { type: 'error',
              text: 'Uncaught TypeError: Cannot read property \'String\' of undefined at http://localhost:7357/assets/vendor.js, line 65295\n' }
    ...
not ok 2 Chrome 65.0 - Global error: Uncaught Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 24850
    ---
        Log: |
            { type: 'error',
              text: 'Uncaught Error: Assertion Failed: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js". at http://localhost:7357/assets/vendor.js, line 24850\n' }

The actual error is located here:

define('ember-inflector/lib/ext/string', ['ember-inflector/lib/system/string'], function (_string) {
  'use strict';

  if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.String) {
@paulcwatts paulcwatts changed the title Ember inflector (and therefore ember-data) fails in ember addon with 3.2.0-beta.1 Failure in ember addon with 3.2.0-beta.1 Apr 11, 2018
@kiwiupover
Copy link

@paulcwatts did you find a work around?

@paulcwatts
Copy link
Author

@kiwiupover My "workaround" was to disable ember-beta and ember-canary in my ember try configuration. I don't know off-hand of any workaround, but if you can define Ember.EXTEND_PROTOTYPES it should be able to work.

ursm added a commit to ember-sapporo/ember-store-helpers that referenced this issue Apr 12, 2018
@papanugget
Copy link

@kiwiupover ' s answer was the only fix that helped me with my Ember quiz. Inserting ember-inflector into the devDependencies object of package.json did nothing for me. Thanks!

@iorrah
Copy link

iorrah commented Oct 18, 2018

Same issue here. I had to update the string.js file to be able to start the server.

Previously:

// my-ember-project/node_modules/ember-inflector/addon/lib/ext/string.js
if (Ember.ENV.EXTEND_PROTOTYPES === true || Ember.ENV.EXTEND_PROTOTYPES.String) {

Later:

// my-ember-project/node_modules/ember-inflector/addon/lib/ext/string.js
if (Ember.ENV.EXTEND_PROTOTYPES === true ||
    (typeof Ember.ENV.EXTEND_PROTOTYPES === 'object' &&
    Ember.ENV.EXTEND_PROTOTYPES.String)) {

Is there a better solution?

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

4 participants