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

Initialization issues with 'ember-basic-dropdown' and 'ember-power-select' #181

Closed
rdavid1099 opened this issue Jul 12, 2023 · 4 comments
Closed

Comments

@rdavid1099
Copy link

Problem

A new Ember app will not build with older versions of ember-basic-dropdown and ember-power-select which are both dependencies of @ember-eui/core.

Specs

"@ember-eui/core": "^6.5.4",
ember-cli: 5.1.0
node: 18.16.0
os: darwin arm64

Solution

I just started learning Ember this week and am working through some tutorials and messing around. I wanted to put in an out-of-the-box style solution and had issues with both ember-paper and ember-eui. The app throws an error when building for local development.

Cannot read properties of undefined (reading 'ember-cli-sass')
    at Class.included (<project directory>/node_modules/@ember-eui/core/node_modules/ember-power-select/index.js:26:50)
    at Class.superWrapper [as included] (<project directory>/node_modules/core-object/lib/assign-properties.js:34:20)
    at <project directory>/node_modules/ember-cli/lib/models/addon.js:475:26
    at Array.reduce (<anonymous>)
    at Class.eachAddonInvoke (<project directory>/node_modules/ember-cli/lib/models/addon.js:472:24)

When looking into the stack, it appears that older versions of both ember-basic-dropdown and ember-power-select, which are dependencies of ember-paper and ember-eui, check for plugins using the code below.

    let hasSass = !!app.registry.availablePlugins['ember-cli-sass'];
    let hasLess = !!app.registry.availablePlugins['ember-cli-less'];

I'm too new to the Ember ecosystem and don't know the initialization process, but I'm assuming that availablePlugins has been deprecated because updating those package versions to "ember-power-select": "^7.1.0" and "ember-basic-dropdown": "^7.2.1" changed the previous code block to this:

    const addons = app.project?.addonPackages || app.registry?.availablePlugins;
    const hasSass = !!addons['ember-cli-sass'];
    const hasLess = !!addons['ember-cli-less'];

After manually updating the dependencies in ember-eui, I was able to build and run the application without any issues.

@betocantu93
Copy link
Collaborator

Hello! Thanks for creating the issue, I'll have a look at a fresh installation and make sure it works! Thanks

@betocantu93
Copy link
Collaborator

Hello @rdavid1099, this issue has been fixed on v7.0.0! Thanks for reporting and I hope you find ember fun and productive

@Rahien
Copy link

Rahien commented Oct 11, 2023

Hey guys,

I had the same issue. Specs:

"@ember-eui/core": "^7.0.11",
ember-cli: 5.2.1
node: 18.15.0
os: linux x64

Had to add this to my package.json

  "overrides": {
    "ember-power-select": "^7.1.0",
    "ember-basic-dropdown": "^7.2.1"
  }

Thanks for the great work!

@betocantu93
Copy link
Collaborator

I think it should now be solved in 7.1.1... tried it with "ember-auto-import": "^2.6.3"... had issued with ember-auto-import 2.4.x.

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

3 participants