Jump to content
Search Community

coltonA

Members
  • Posts

    5
  • Joined

  • Last visited

coltonA's Achievements

  1. Thanks for all the help! I do have a function to check if the window is present. const isBrowser = () => typeof window !== 'undefined'; I agree it's super weird. I'm asking in some Vite/Hydrogen forums but here is the error if this means anything to you? As I mentioned before it seems related to Hydrogen, especially since it works in Next.js etc, so no worries if you're not sure, I still really appreciate your help! 10:10:54 AM [vite] Error when evaluating SSR module virtual__hydrogen-routes.server.jsx: /home/-/Desktop/Projects/-/node_modules/gsap/ScrollTrigger.js:12 import { Observer, _getTarget, _vertical, _horizontal, _scrollers, _proxies, _getScrollFunc, _getProxyProp, _getVelocityProp } from "./Observer.js"; ^^^^^^ SyntaxError: Cannot use import statement outside a module at compileFunction (<anonymous>) at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1033:15) at Module._compile (node:internal/modules/cjs/loader:1069:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29) at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:385:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) at async nodeImport (/home/-/Desktop/Projects/-/node_modules/vite/dist/node/chunks/dep-689425f3.js:50387:21) at async eval (/src/components/IntroVideo/IntroVideo.client.jsx?no-proxy:14:31) at async instantiateModule (/home/-/Desktop/Projects/-/node_modules/vite/dist/node/chunks/dep-689425f3.js:50317:9) /home/-/Desktop/Projects/-/node_modules/gsap/ScrollTrigger.js:12 import { Observer, _getTarget, _vertical, _horizontal, _scrollers, _proxies, _getScrollFunc, _getProxyProp, _getVelocityProp } from "./Observer.js"; ^^^^^^ SyntaxError: Cannot use import statement outside a module at compileFunction (<anonymous>) at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1033:15) at Module._compile (node:internal/modules/cjs/loader:1069:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29) at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:385:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) at async nodeImport (/home/-/Desktop/Projects/-/node_modules/vite/dist/node/chunks/dep-689425f3.js:50387:21) at async eval (/src/components/IntroVideo/IntroVideo.client.jsx?no-proxy:14:31) at async instantiateModule (/home/-/Desktop/Projects/-/node_modules/vite/dist/node/chunks/dep-689425f3.js:50317:9)
  2. Yea, unfortunately I have to stick with Hydrogen (React) ? . Importing ScrollTrigger causes the app to crashes because even though it's a client side file it's trying to load it on the server, which gives a Vite error causing the crash. It's definitely not a green sock issue, it's Hydrogen. I was hoping maybe someone on here has worked with the two before. The two requirements I have are: 1. Pinning the scroll 2. Keeping track of the scroll position with some kind of onUodate function.
  3. I am trying to set up a timeline to pin a div to the page until the user scrolls to a certain point. I can't tell why it's not working. I'd really appreciate a second set of eyes. Hydrogen uses SSR which makes things kind of tricky.
  4. Hello, I have a marquee effect using timelines and I keep noticing this weird bug where the marquee jumps every now and them and I can't figure out why. I attached a simplified bare bones codepen of what I have. It's a little complicated (luckily not so much with Greensock) but I need the marque to infinitely scroll horizontally, when the user scrolls down the marquee reverses its direction and speeds up a little, once the user stops scrolling the direction and speed return to the original values. And when the user is scrolling up the marquee speed increases. Any help would be appreciated, thank you!
×
×
  • Create New...