Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gsap is not defined #5

Closed
lucasjohnston opened this issue Jun 1, 2024 · 3 comments
Closed

gsap is not defined #5

lucasjohnston opened this issue Jun 1, 2024 · 3 comments

Comments

@lucasjohnston
Copy link

lucasjohnston commented Jun 1, 2024

Hey πŸ‘‹ Puppeteer seems to be throwing an undefined error when trying to run this package.

Error:

$ gsap-video-export https://lettermark.co.uk -S "#logo"
gsap-video-export 1.0.3 / @defaced

┃
┃ Support this project!
┃
┃ Help support the work that goes into creating and maintaining my projects
┃ and buy me a coffee via Ko-fi or sponsor me on GitHub Sponsors.
┃
┃ Ko-fi: https://ko-fi.com/defaced
┃ GitHub Sponsors: https://github.com/sponsors/workeffortwaste/
┃

https://lettermark.co.uk

Browser.......................................................................OK
Selector..............................................................(#logo) OK
GSAP.....................................................................v3.12.5
/Users/lucas/.nvm/versions/node/v20.11.1/lib/node_modules/gsap-video-export/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221
            throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
                  ^

Error: Evaluation failed: ReferenceError: gsap is not defined
    at <anonymous>:5:37
    at ExecutionContext._evaluateInternal (/Users/lucas/.nvm/versions/node/v20.11.1/lib/node_modules/gsap-video-export/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/Users/lucas/.nvm/versions/node/v20.11.1/lib/node_modules/gsap-video-export/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async exportVideo (file:///Users/lucas/.nvm/versions/node/v20.11.1/lib/node_modules/gsap-video-export/index.js:339:20)
@workeffortwaste
Copy link
Owner

workeffortwaste commented Jun 1, 2024 via email

@workeffortwaste
Copy link
Owner

So the problem is for the site in your example the gsap library is not exposed to the Window, which means my tool can't hook into it or the animation timeline.

image

@lucasjohnston
Copy link
Author

Thanks for letting me know! Might be worth a check for this - will take a look later today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants