This does seem to be an often-reported issue wherever Next.js and ScrollTrigger are used together.
If you know your project setup supports ES modules but ScrollTrigger is still causing Next to report the "SyntaxError: Cannot use import statement outside a module" error, try adding this to your next.config.js :
module.exports = {
transpilePackages: ['gsap'],
/* Your Next.js config */
};