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

Installation broken with Ember Octane Blueprint #257

Closed
ELepolt opened this issue Dec 19, 2019 · 8 comments
Closed

Installation broken with Ember Octane Blueprint #257

ELepolt opened this issue Dec 19, 2019 · 8 comments

Comments

@ELepolt
Copy link

ELepolt commented Dec 19, 2019

ember new ember-quickstart -b @ember/octane-app-blueprint
cd ember-quickstart/
ember install ember-cli-notifications

Installing packages... This might take a couple of minutes.
npm: Installed ember-cli-notifications
Cannot read property 'ui' of undefined


Stack Trace and Error Report: /tmp/error.dump.e623d070e33cb904187d8ce501e6e10b.log
An error occurred in the constructor for ember-css-modules at /home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-css-modules

An error occurred in the constructor for ember-cli-notifications at /home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli-notifications

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Cannot read property 'ui' of undefined
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: Cannot read property 'ui' of undefined
  - name: TypeError
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: TypeError: Cannot read property 'ui' of undefined
    at PackageInfo.dumpInvalidAddonPackages (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli/lib/models/package-info-cache/package-info.js:366:22)
    at Class.discoverAddons (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli/lib/models/addon.js:487:15)
    at Class.initializeAddons (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli/lib/models/addon.js:505:10)
    at setupRegistryForEachAddon (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli-preprocess-registry/preprocessors.js:18:10)
    at Object.module.exports.setupRegistry (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli-preprocess-registry/preprocessors.js:46:3)
    at Class.init (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-cli/lib/models/addon.js:327:7)
    at Class.superWrapper [as init] (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/core-object/lib/assign-properties.js:34:20)
    at Class.init (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/ember-css-modules/index.js:23:42)
    at Class.superWrapper [as init] (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/core-object/lib/assign-properties.js:34:20)
    at new CoreObject (/home/evan/Documents/Code/tmp/ember-quickstart/node_modules/core-object/core-object.js:9:15)
@mansona
Copy link
Owner

mansona commented Dec 19, 2019

hey thanks for your report! can you please test the upcoming beta and see if it still causes an issue? you can see more info here #251 (comment) but you can install it using npm i ember-cli-notifications@next

@ELepolt
Copy link
Author

ELepolt commented Dec 19, 2019

That works!

One note that I did find:

In your docs you have this line
notifications: Ember.inject.service('notification-messages')

In Ember-Octane that would turn into:
@service('notification-messages') notifications;

But that errors out: Error: Assertion Failed: Attempting to inject an unknown injection: 'service:notification-messages'

But it's happy with it just being this:
@service notifications;

@mansona
Copy link
Owner

mansona commented Dec 19, 2019

@ELepolt yes the docs will also update when that is merged 👍 you can see the updated docs here: https://deploy-preview-251--ember-cli-notifications.netlify.com/

@cah-brian-gantzler
Copy link

after pr #258 is now also worked when doing --environment=production

@mansona
Copy link
Owner

mansona commented Jan 9, 2020

I'm going to close this for now because #251 is finally merged 👍 let me know if anyone has any more issues and we can get them fixed right away 💪

@mansona mansona closed this as completed Jan 9, 2020
@rinoldsimon
Copy link

Error: Assertion Failed: Attempting to inject an unknown injection: 'service:notification-messages'

Code:
initializer/inject-notifications.js

export function initialize( application ) {
  ['controller', 'component', 'route'].forEach(injectionTarget => {
    application.inject(injectionTarget, 'notifications', 'notification-messages:service');
  });
}

export default {
  name: 'inject-notifications',
  initialize
};

Ember - 3.26.1
"ember-cli-notifications": "^6.3.4",
 

@mansona
Copy link
Owner

mansona commented Apr 20, 2021

@rinoldsimon it looks like your issue isn't related to this one 🤔 the service name was updated in v5 to just notifications https://github.com/mansona/ember-cli-notifications/blob/master/CHANGELOG.md#500--2020-01-09

If you still have an issue can you open a new one?

@rinoldsimon
Copy link

But the docs aren’t updated. It still says notification-messages https://ember-cli-notifications.netlify.app/

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