GSAP drawsvg is now free, netlify still needs env for it to work

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

@barish90 What’s leading you to that conclusion?

The error as stated is:

What’s on line 11 of .next/server/pages/About.js ?

Ok, so let me explain more. The app was originally built with the following console logs (and you can check it if you visit the URL)

framework-f75312fc4004b783.js:1 Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at lh (framework-f75312fc4004b783.js:1:56647)
    at i (framework-f75312fc4004b783.js:1:131278)
    at oF (framework-f75312fc4004b783.js:1:109262)
    at oM (framework-f75312fc4004b783.js:1:109132)
    at ow (framework-f75312fc4004b783.js:1:104205)
    at x (framework-f75312fc4004b783.js:1:7799)
    at MessagePort.T (framework-f75312fc4004b783.js:1:8329)
a6 @ framework-f75312fc4004b783.js:1
a.componentDidCatch.t.callback @ framework-f75312fc4004b783.js:1
lY @ framework-f75312fc4004b783.js:1
uK @ framework-f75312fc4004b783.js:1
e @ framework-f75312fc4004b783.js:1
(anonymous) @ framework-f75312fc4004b783.js:1
oD @ framework-f75312fc4004b783.js:1
setTimeout
ow @ framework-f75312fc4004b783.js:1
x @ framework-f75312fc4004b783.js:1
T @ framework-f75312fc4004b783.js:1
main-bf35d5aeff340402.js:1 Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at lh (framework-f75312fc4004b783.js:1:56647)
    at i (framework-f75312fc4004b783.js:1:131278)
    at oF (framework-f75312fc4004b783.js:1:109262)
    at oM (framework-f75312fc4004b783.js:1:109132)
    at ow (framework-f75312fc4004b783.js:1:104205)
    at x (framework-f75312fc4004b783.js:1:7799)
    at MessagePort.T (framework-f75312fc4004b783.js:1:8329)

However, it doesn’t work properly as the GSAP plugin isn’t being used, and once I modify the code to use GSAP, it keeps failing.

Nothing, just a space.

The runtime console logs aren’t necessarily related to build success or failure.
They’re also formatted as production errors, so they’re obfuscated.
As it instructions you would have needed to run your dev environment to see the real error.

It wouldn’t have mattered, but I cannot due to the site having been removed.

If I’m interpreting this correctly you’re saying:

“It doesn’t work correctly at runtime because it needs the GSAP plugin and doesn’t have it”

Then separately:

“When I add the GSAP plugin the build fails”

Perhaps you’re right, I don’t know enough about specifically what you’re working with.
However I’m just pointing out that the build error as reported doesn’t mention the plugin at all.
It mentions only a SyntaxError in .next/server/pages/About.js

This doesn’t surprise me, because you probably checked a ‘source file’ of some kind.
However the error seems to indicate line 11 position 5426, so is likely to be a minified output file.