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

Problem with contextual components #221

Open
adet4ever opened this issue Sep 10, 2018 · 0 comments
Open

Problem with contextual components #221

adet4ever opened this issue Sep 10, 2018 · 0 comments
Labels

Comments

@adet4ever
Copy link

ember-cli: 3.4.1
node: 10.10.0
os: linux x64

on starting the ember application, I get this error message:
Cannot read property 'indexOf' of undefined
Stack Trace and Error Report: /tmp/error.dump.788cf782093e6537f56a264725f71192.log

seems to be an issue with emberx-select-blockless in API addon.
Meanwhile, I understand that the emberx-select-blockless is deprecated, I was able to get it working in ember-cli@3.4.0-beta.2

hasContextualComponents: function () {
   var VersionChecker = require('ember-cli-version-checker');

   var checker = new VersionChecker(this);
   var dep = checker.for('ember', 'bower');

   var isBetaOrCanary = ['beta', 'canary'].filter(function(version) {
     return dep.version.indexOf(version) >= 0;     //dep.version is undefined.
   });

   return !!(dep.satisfies('>= 2.3.0 < 3.0.0') || isBetaOrCanary.length > 0);
 },

works fine in: ember-cli@3.4.0-beta.2
broken in: ember-cli@3.4.1

With trace:

  • broccoliBuilderErrorStack: [undefined]
  • codeFrame: [undefined]
  • errorMessage: Cannot read property 'indexOf' of undefined
  • errorType: [undefined]
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: [undefined]
  • message: Cannot read property 'indexOf' of undefined
  • name: TypeError
  • nodeAnnotation: [undefined]
  • nodeName: [undefined]
  • originalErrorMessage: [undefined]
  • stack: TypeError: Cannot read property 'indexOf' of undefined
    at /home/monkey/projects/p30m/phmscli/appkit/node_modules/emberx-select-blockless/node_modules/emberx-select/index.js:14:26
    at Array.filter ()
    at Class.hasContextualComponents (/home/monkey/projects/p30m/phmscli/appkit/node_modules/emberx-select-blockless/node_modules/emberx-select/index.js:13:45)
    at Class.treeForAddonTemplates (/home/monkey/projects/p30m/phmscli/appkit/node_modules/emberx-select-blockless/node_modules/emberx-select/index.js:24:14)
    at Class._treeFor (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:617:33)
    at Class._addonTemplateFiles (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:1090:31)
    at Class.compileTemplates (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:1141:81)
    at Class.compileAddon (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:1205:30)
    at Class.treeForAddon (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:860:26)
    at Class._treeFor (/home/monkey/projects/p30m/phmscli/appkit/node_modules/ember-cli/lib/models/addon.js:617:33)

Any suggestions, help is appreciated

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

No branches or pull requests

1 participant