Jump to content
Search Community

Aenzenith

Members
  • Posts

    2
  • Joined

  • Last visited

Aenzenith's Achievements

  1. You saved my life, thanks! I have so many projects that using GSAP with Laravel/Vue & Inertia. I will try this.
  2. PS C:\projects\***> php artisan inertia:start-ssr Starting SSR server on port 13714... Inertia SSR server started. file:///C:/projects/***/bootstrap/ssr/assets/Master.4e1463bd.mjs:8 import { ScrollSmoother, gsap, ScrollTrigger } from "gsap/all.js"; ^^^^^^^^^^^^^^ SyntaxError: Named export 'ScrollSmoother' not found. The requested module 'gsap/all.js' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'gsap/all.js'; const { ScrollSmoother, gsap, ScrollTrigger } = pkg; at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21) at async ModuleJob.run (node:internal/modules/esm/module_job:189:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async I (file:///C:/projects/***/node_modules/@inertiajs/vue3/dist/index.esm.js:1:5449) at async Server.<anonymous> (file:///C:/projects/***/node_modules/@inertiajs/core/dist/server.esm.js:1:527) file:///C:/projects/***/bootstrap/ssr/assets/Master.4e1463bd.mjs:8 at async Server.<anonymous> (file:///C:/projects/***/node_modules/@inertiajs/core/dist/server.esm.js:1:527) file:///C:/projects/***/bootstrap/ssr/assets/Master.4e1463bd.mjs:8 import { ScrollSmoother, gsap, ScrollTrigger } from "gsap/all.js"; ^^^^^^^^^^^^^^ SyntaxError: Named export 'ScrollSmoother' not found. The requested module 'gsap/all.js' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'gsap/all.js'; const { ScrollSmoother, gsap, ScrollTrigger } = pkg; at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21) at async ModuleJob.run (node:internal/modules/esm/module_job:189:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async I (file:///C:/projects/***/node_modules/@inertiajs/vue3/dist/index.esm.js:1:5449) at async Server.<anonymous> (file:///C:/projects/***/node_modules/@inertiajs/core/dist/server.esm.js:1:527) PS C:\projects\***> Hi there! I got this error on terminal. I'm using Laravel+Vue.js+Inertia.js(for routing and SSR) stack for my project. When it runs in dev and prod, there isn't any problems. But when i activate SSR, i getting the error in the board. I don't think this problem is related to Inertia, Nuxt, Next etc. Is there any SSR solutions for GSAP?
×
×
  • Create New...