I recently updated my gsap node module and keep receiving the following errors with the new update. This is happening with both draggable and throwPropsPlugin js files. Any thoughts on a work around?
my js file:
import * as TweenLite from "gsap/umd/TweenLite";
import * as TweenMax from "gsap/umd/TweenMax";
import * as Modifiers from "gsap/umd/ModifiersPlugin";
import * as Draggable from "gsap/umd/Draggable";
import * as ThrowPropsPlugin from "gsap/umd/ThrowPropsPlugin";
Not sure if you meant to post the same thing again.
Try adding this code to prevent errors during server rendering.
if (typeof window === "undefined") {
var dummyElement = {
style: {},
appendChild: function() {},
removeChild: function() {}
};
global.window = {};
global.navigator = { userAgent: "" };
global.document = { createElement: function() { return dummyElement } };
}
I just ran that in node without any errors. The "GSAP