Jump to content
Search Community

Uncaught SyntaxError (Invalid Regexp) in TextPlugin + TweenMax 2.0.1?

JimmiQR 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 am getting runtime errors when I include both the TweenMax and TextPlugin. While trying to narrow it down, it appears to be some conflict when both of those files are included? No other code! Here is the other weird part; I only get this error when the files are hosted online, not when running on my local server instance. I also can NOT get the errors to trigger in Codepen or JsFiddle. Only on my own domain in production. Here is the 2-line file that causes the error: http://jimmiheiserman.com/archive/gsap/text-plugin-error.html

 

Below are just the two lines (and versions) that are inside that file.

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenMax.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/plugins/TextPlugin.min.js"></script>

 

The console error I get says:

Uncaught SyntaxError: Invalid regular expression: /[-]|�[�-�]|�[�-�]|[⚔-⚗]|�[�-�]|[�-�][�-�]/: Range out of order in character class
    at new RegExp (<anonymous>)
    at TextPlugin.min.js:12
    at TextPlugin.min.js:12

 

Each of the two files included individually does not trigger this error, but when they are both included, it does. Is it possible my domain is to blame for this? Can someone test this file on another domain? That seems conspiratorial to think my domain is mangling something, so my first idea is to think that there is just some conflict arising in the TextPlugin 2.0.1 and the TweenMax 2.0.1 and codepen and jsfiddle suppress the error? I get this error in both Chrome and FF (as expected, cause JS)

 

Internal source version numbers:

  • TweenMax
    • VERSION: 2.0.1
    • DATE: 2018-05-30
  • TextPlugin
    • VERSION: 0.6.2
    • DATE: 2018-02-15

 

 

Link to comment
Share on other sites

[Original poster here, GSAP Forums locked me out of my JimmiQR account]

 

No, missing those tags were not the issue, I just did that to show the simplest example that triggers it. This was happening in a full html/css/js site I am working on.

 

Here is one with more tags, same error: http://jimmiheiserman.com/archive/gsap/text-plugin-error-2.html

 

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...