Skip to content

Cannot read property 'on' of undefined #354

@mohitsud

Description

@mohitsud
  • I created a brand new sample-app on Ember 3.20.
  • I installed ember-cli-sass and ember-component-css
  • I added podstyles import to app.scss
  • I created a sample component and confirmed this module works.
  • I then created a routeable engine
  • I added ember-component-css and -ember-cli-sass to the package.json dependencies.
  • When I run the app, I get this error:
Error while processing route: super-blog.myroute Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
    at Object.initialize (http://localhost:4200/assets/vendor.js:107231:12)
    at http://localhost:4200/assets/vendor.js:36905:21
    at Vertices.each (http://localhost:4200/assets/vendor.js:57444:9)
    at Vertices.walk (http://localhost:4200/assets/vendor.js:57358:12)
    at DAG.each (http://localhost:4200/assets/vendor.js:57288:22)
    at DAG.topsort (http://localhost:4200/assets/vendor.js:57296:12)
    at Class._runInitializer (http://localhost:4200/assets/vendor.js:36920:13)
    at Class.runInstanceInitializers (http://localhost:4200/assets/vendor.js:36903:12)
    at Class._bootSync (http://localhost:4200/assets/vendor.js:37326:17)
    at http://localhost:4200/assets/vendor.js:37302:77
logError @ router.js:1212
error @ router.js:1149
triggerEvent @ router.js:1312
triggerEvent @ router.js:180
trigger @ router_js.js:467
transitionDidError @ router.js:202
(anonymous) @ router_js.js:273
invokeCallback @ rsvp.js:493
publish @ rsvp.js:476
publishRejection @ rsvp.js:412
(anonymous) @ rsvp.js:19
invoke @ backburner.js:338
flush @ backburner.js:229
flush @ backburner.js:426
_end @ backburner.js:960
Backburner._boundAutorunEnd @ backburner.js:629
Promise.then (async)
iterations @ backburner.js:28
flush @ index.js:43
_scheduleAutorun @ backburner.js:1179
_ensureInstance @ backburner.js:1167
schedule @ backburner.js:776
schedule @ index.js:361
waitForDOMReady @ application.js:421
init @ application.js:331
superWrapper @ index.js:441
initialize @ core_object.js:88
create @ core_object.js:604
(anonymous) @ app-boot.js:3
route-styles.js:13 Uncaught (in promise) TypeError: Cannot read property 'on' of undefined
    at Object.initialize (route-styles.js:13)
    at index.js:136
    at Vertices.each (dag-map.js:231)
    at Vertices.walk (dag-map.js:145)
    at DAG.each (dag-map.js:75)
    at DAG.topsort (dag-map.js:83)
    at Class._runInitializer (index.js:151)
    at Class.runInstanceInitializers (index.js:134)
    at Class._bootSync (instance.js:94)
    at instance.js:70

I would welcome any assistance. Is this resolved in the v1 alphas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions