Sign in

Error report of introducing creaejs related files into Vue - -

bhavya edited in Sat, 10 Sep 2022

At Vue's index.html Create JS is introduced into the file

    <script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
    <script src="./static/js/ani.js"></script>

Introduced ani.js As follows:

The components are as follows:

Console error:

createjs-2015.11.26.min.js:12 Uncaught TypeError: Cannot read property 'getContext' of undefined
    at a.b._parseData (createjs-2015.11.26.min.js:12)
    at new a (createjs-2015.11.26.min.js:12)
    at handleComplete (LaunchScreen.vue?d9bd:53)
    at a.b._dispatchEvent (createjs-2015.11.26.min.js:12)
    at a.b.dispatchEvent (createjs-2015.11.26.min.js:12)
    at a.b._sendComplete (createjs-2015.11.26.min.js:15)
    at a.b._loadNext (createjs-2015.11.26.min.js:15)
    at a.b._handleError (createjs-2015.11.26.min.js:15)
    at createjs-2015.11.26.min.js:12
    at a.b._dispatchEvent (createjs-2015.11.26.min.js:12)

The animation on the page is not displayed. The animation is a code file exported by UI

3 Replies
commented on Sat, 10 Sep 2022

app.js Now, what's the problem?

commented on Sat, 10 Sep 2022

Getcontext this error is generally your canvas element into the problem, the code is not complete. Check whether the DOM node is needed to initialize this thing, and whether the element you pass in is normal.

commented on Sun, 11 Sep 2022

Hello, can you refer to the init content? I can't use the UI export file