question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors when Running from Script Src

See original GitHub issue

I’m building a photo slideshow component, and I’d like to animate each photo in using variations of scale, translateX, translateY, and opacity. So your component looks perfect!

The page is created without a build pipeline, so I’m including your script using unpkg. I’ve worked through several errors already, but I’m stuck with these three errors. The page works without your animate library (sans animations of course) and now I’m not sure what the problem might be. Seems like it should all work.

Here’s how I’m importing your library, pulling in react-transition-group as a dependency for your library.

<script src="https://unpkg.com/react-transition-group@2.2.0/dist/react-transition-group.min.js"></script>
<script src="https://unpkg.com/react-simple-animate@1.7.2/lib/animate.js"></script>

And here’s how I’m using your library.

        const Photo = ({src,questCode}) => {
            return (
                <div className="photo-container">
                    <Animate
                        startAnimation={true}
                        startStyle={{"transform":"scale(0.5)"}}
                        endStyle={{"transform":"scale(1)"}}
                        durationSeconds="0.3"
                        easeType="linear">
                        <img key={questCode} className="photo" src={src} />
                    </Animate>
                </div>
            )
        }

image

Here’s the source of the entire file, just unzip the html page into a folder then run python -m SimpleHTTPServer in that folder to view it using a webserver… slideshow.html.zip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bluebill1049commented, Oct 31, 2017

sorry mate, can’t figure it out. you may want to post the question on stack overflow?

0reactions
bluebill1049commented, Dec 2, 2018

hey @AmirinNS, i haven’t spend too much time without using a build tool (eg. webpack hence create react app works)… i may take a look at it, once i am complete with incoming hooks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What causes a Script error and how to solve them · Raygun Blog
While Script error is caused by violating the browser's same-origin policy, a Long Running Script indicates performance issues. Every browser ...
Read more >
How to tell if a <script> tag failed to load - Stack Overflow
If the src attribute's value is the empty string or if it could not be resolved, then the user agent must queue a...
Read more >
What are Script Errors and How Can We Address Them?
Script Errors are errors that the browser sends to the onerror callback when they originate from a third-party script. It usually happens when ......
Read more >
What Is a Script Error: Causes and How to Fix Them - Sematext
How to Fix Script Errors · 1. Add `crossorigin` attribute on the script tag · 2. Return Access-Control-Allow-Origin header on the second origin....
Read more >
Causes and solutions for script errors - Application Real-Time ...
Script errors usually come from scripts under third-party domain names. If script errors does not affect the running of your application, you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found