Jump to content
Search Community

MorphSVGPlugin Uncaught Error: Mismatched anonymous define

dcrandall test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm trying my darnedest to get morphsvg to load, and I just can't seem to make it happen.

 

I was able to get this example to load without any sort of issue -


However, I try this:
 

<script src="./thirdparty/TweenLite.js"></script>
<script src="./thirdparty/plugins/MorphSVGPlugin.js"></script>


and All I get is:

require.2.1.4.min.js:1 Uncaught Error: Mismatched anonymous define() module: function() {
        return (_gsScope.GreenSockGlobals || _gsScope)[name];
    }
Edited by dcrandall
Incomplete in trying to not have my last bit formated.
Link to comment
Share on other sites

First of all, thanks for being "Shockingly Green" :) Welcome to the forums. 

 

I don't think I've ever seen that error before. Hm. Can you post a reduced test case that demonstrates the issue so that we can see it in context? Sounds like a RequireJS thing. Which MorphSVGPlugin file are you using - the ES module or the standard ES5 one? (which directory did you take it from?)

Link to comment
Share on other sites

  <script src="./thirdparty/TweenLite.js"></script>
  <script src="./thirdparty/plugins/MorphSVGPlugin.js"></script>

  <!--this MUST be loaded after the plugins for GSAP\Tween-->
  <script src="./thirdparty/require.2.1.4.min.js"></script>


Got 'er fixed.   Thank you for the response!  

Sorry, it was Friday at 3:30, I was frustrated, and the idea of breaking out my simple project was lost in "don't punch the screen, don't punch the screen".  :)

Basically requirejs needs to be loaded after the es5 stuff.   Before, and it doesn't know what to do.

Now if  you'll excuse me, I have a date with a stackoverflow response.


 

  • Like 2
  • Haha 1
Link to comment
Share on other sites

On 7/14/2018 at 7:40 AM, dcrandall said:

 "don't punch the screen, don't punch the screen"

 

Ha! I've been there a few times late at night when I'm tired and over-caffeinated. 

 

Glad to hear that you have it all working now. Happy tweening.

:)

 

  • Haha 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...