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

Undefined is not an object #1032

Open
jalorenz opened this issue Jul 24, 2019 · 2 comments
Open

Undefined is not an object #1032

jalorenz opened this issue Jul 24, 2019 · 2 comments

Comments

@jalorenz
Copy link

jalorenz commented Jul 24, 2019

Hi everyone,

i have a pretty strange bug, when creating a Stage.

var stage = new createjs.Stage("canvas"); console.log(stage);

The constructor immediately causes this error:

[Error] TypeError: undefined is not an object (evaluating 'c.t.addEventListener') — createjs.min.js:1393
Bg (react-dom.production.min.js:117:156)
callback (react-dom.production.min.js:126)
Ag (react-dom.production.min.js:116:410)
zg (react-dom.production.min.js:116:151)
qi (react-dom.production.min.js:131)
ui (react-dom.production.min.js:133:323)
(anonyme Funktion) (react-dom.production.min.js:158:380)
unstable_runWithPriority (react.production.min.js:27)
Vc (react-dom.production.min.js:158:363)
Sc (react-dom.production.min.js:158:147)
Z (react-dom.production.min.js:156:495)
ah (react-dom.production.min.js:159:229)
xf (react-dom.production.min.js:40)
xf
[Error] TypeError: undefined is not an object (evaluating 'c.t.addEventListener')
Z (react-dom.production.min.js:157:194)
ah (react-dom.production.min.js:159:229)
xf (react-dom.production.min.js:40)
xf

Its refers to line 1392 in create.min.js:

for (b in d)
c = d[b], c.t.addEventListener(b, c.f, !1)

macOS, Safari,
Windows, Internet Explorer 11

@Pi-Bouf
Copy link

Pi-Bouf commented Aug 5, 2019

You have a div with id canvas ?
or just a <canvas></canvas> ?

@jedateach
Copy link

jedateach commented Jan 7, 2020

@jalorenz to help you debug / provide debugging information it can be useful to switch to use the non-minified version of the library. Just load create.js instead of create.min.js.

It's also useful for issues to drop the stack information into a code block

like this
block
here

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