Hello Everyone,
I’ve used GSAP and its drawsvg plugin in my NEXT project, and the project builds and runs fine locally; however, when I deploy the project, I get build errors. The issue seems to be that this plugin was paid before, but now the GSAP team has made all their plugin free, however, Netlify still thinks this is a paid plugin and needs an auth token. Any idea how I can fix this issue?
The URL for my Netlify project is https://dentawista.netlify.app
And this is the failed deploy log
6:23:05 PM: Netlify Build
6:23:05 PM: ────────────────────────────────────────────────────────────────
6:23:05 PM:
6:23:05 PM: ❯ Version
6:23:05 PM: @netlify/build 32.1.4
6:23:05 PM:
6:23:05 PM: ❯ Flags
6:23:05 PM: accountId: 60a6be20c64077136bdfba75
6:23:05 PM: baseRelDir: true
6:23:05 PM: buildId: 6823c6174002fa0008cc61f3
6:23:05 PM: deployId: 6823c6174002fa0008cc61f5
6:23:06 PM:
6:23:06 PM: ❯ Current directory
6:23:06 PM: /opt/build/repo
6:23:06 PM:
6:23:06 PM: ❯ Config file
6:23:06 PM: /opt/build/repo/netlify.toml
6:23:06 PM:
6:23:06 PM: ❯ Context
6:23:06 PM: production
6:23:06 PM:
6:23:06 PM: ❯ Using Next.js Runtime - v5.11.1
6:23:07 PM: Next.js cache restored
6:23:07 PM:
6:23:07 PM: build.command from netlify.toml
6:23:07 PM: ────────────────────────────────────────────────────────────────
6:23:07 PM:
6:23:07 PM: $ npm run build
6:23:07 PM: > dentawista@0.0.0 build
6:23:07 PM: > next build
6:23:08 PM: ▲ Next.js 15.3.2
6:23:08 PM: Skipping validation of types
6:23:08 PM: Skipping linting
6:23:08 PM: Creating an optimized production build ...
6:23:17 PM: ✓ Compiled successfully in 8.0s
6:23:17 PM: Collecting page data ...
6:23:21 PM: SyntaxError: Cannot use import statement outside a module
6:23:21 PM: at 9019 (.next/server/pages/About.js:11:5426)
6:23:21 PM: > Build error occurred
6:23:21 PM: [Error: Failed to collect page data for /About] { type: 'Error' }
6:23:21 PM:
6:23:21 PM: "build.command" failed
6:23:21 PM: ────────────────────────────────────────────────────────────────
6:23:21 PM:
6:23:21 PM: Error message
6:23:21 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
6:23:21 PM:
6:23:21 PM: Error location
6:23:21 PM: In build.command from netlify.toml:
6:23:21 PM: npm run build
6:23:21 PM:
6:23:21 PM: Resolved config
6:23:21 PM: build:
6:23:21 PM: command: npm run build
6:23:21 PM: commandOrigin: config
6:23:21 PM: environment:
6:23:21 PM: - NODE_VERSION
6:23:21 PM: - NPM_FLAGS
6:23:21 PM: - NETLIFY_USE_YARN
6:23:21 PM: - NEXT_TELEMETRY_DISABLED
6:23:21 PM: publish: /opt/build/repo/.next
6:23:21 PM: publishOrigin: config
6:23:21 PM: plugins:
6:23:21 PM: - inputs: {}
6:23:21 PM: origin: config
6:23:21 PM: package: '@netlify/plugin-nextjs'
6:23:22 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
6:23:22 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:23:22 PM: Failing build: Failed to build site
6:23:22 PM: Finished processing build request in 45.279s