Skip to content

Undefined is not an object #1032

Open
Open

Description

@jalorenz

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

Activity

  1. Pi-Bouf commented on Aug 5, 2019

    @Pi-Bouf

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

  2. jedateach commented on Jan 7, 2020

    @jedateach

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions