Cannot read property 'addScene' of undefined
queenvictoria opened this issue · 2 comments
queenvictoria commented
Hey there. Thanks a mil for the work. Any ideas about this error?
Uncaught TypeError: Cannot read property 'addScene' of undefined
My router has another scroll controller; removing it doesn't seem to fix it:
import EmberRouter from '@ember/routing/router';
import RouterScroll from 'ember-router-scroll';
import ScrollControllerRouteMixin from 'ember-scrollmagic/mixins/scroll-controllers/route-mixin';
import config from './config/environment';
const Router = EmberRouter.extend(RouterScroll, ScrollControllerRouteMixin, {
location: config.locationType,
rootURL: config.rootURL
});
My template has (copied from the docs):
queenvictoria commented
I've looked into this a bit more.
- Started with a vanilla 2.16.x
$ ember init && ember install ember-scrollmagic && ember s
- Upgrade to 2.18.x
- Upgrade to 3.1.4
All of these scenarios resulted in the same uncaught type error.
queenvictoria commented
Ok very sorry about that looks like I can't read documentation.
It needs to be registered in your routes/application.js:
I mixed it in to router.js
like router-scroll
rather than routes/application.js
.
Closed.