greensock / GSAP

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web
https://gsap.com
19.85k stars 1.72k forks source link

Build Error: export 'TweenMaxWithCSS' (reexported as 'TweenMax') was not found in './gsap-core.js' #355

Closed CaelanStewart closed 4 years ago

CaelanStewart commented 4 years ago

Version: 3.1.0

WARNING in /Users/user/homestead-projects/project/node_modules/gsap/all.js 7:0-373
"export 'TweenMaxWithCSS' (reexported as 'TweenMax') was not found in './gsap-core.js'

When I import from gsap/all.

Looking at gsap/all.js:

There is this line:

export { TweenMaxWithCSS as TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle } from "./gsap-core.js";

However, in ./gsap-core.js there exists no such symbol TweenMaxWithCSS.

This does not prevent a build since only a warning is issued.

Might cause problems for some build configurations though.

billdwhite commented 4 years ago

Same problem here. Should we still be using gsap/all for our imports? (I'm importing into Angular 8)

CaelanStewart commented 4 years ago

@billdwhite - yeah I wondered as much, surprising how this would not have been caught before release, unless they use a different mechanism for import.

ZachSaucier commented 4 years ago

Do you get the same error when you import from "gsap" (for ES modules) or "gsap/dist/gsap" (for UMD/CommonJS)?

Our install helper shows the syntax that I mean.

billdwhite commented 4 years ago

I had my module set to 'esnext'; changing all of the 'gsap/all' references to 'gsap' seems to fix the issue.

jackdoyle commented 4 years ago

Yeah, sorry about that folks - silly mistake on my part. I'll have a 3.1.1 patch out pretty soon to resolve the export issue in the "all" file.

jackdoyle commented 4 years ago

Should be fixed in the latest push. Again, please accept my apologies for the oversight.