{"record":{"id":"1b602a69f5a0c028","repo":"greensock/GSAP","slug":"please-gsap-registerplugin-patheditor","errorCode":null,"errorMessage":"Please gsap.registerPlugin(PathEditor)","messagePattern":"Please gsap\\.registerPlugin\\(PathEditor\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/utils/PathEditor.js","lineNumber":160,"sourceCode":"\t_callback = (type, self, param) => {\n\t\tlet callback = self.vars[type];\n\t\tif (callback) {\n\t\t\tcallback.call(self.vars.callbackScope || self, param || self);\n\t\t}\n\t\treturn self;\n\t},\n\t_copyElement,\n\t_resetSelection = () => {\n\t\t_copyElement.style.display = \"block\";\n\t\t_copyElement.select();\n\t\t_copyElement.style.display = \"none\";\n\t},\n\t_coreInitted,\n\t_initCore = (core) => {\n\t\t_doc = document;\n\t\t_win = window;\n\t\t_body = _doc.body;\n\t\tgsap = gsap || core || _win.gsap || console.warn(\"Please gsap.registerPlugin(PathEditor)\");\n\t\t_context = (gsap && gsap.core.context) || function() {};\n\t\t_tempDiv = _createElement(\"div\");\n\t\t_copyElement = _createElement(\"textarea\");\n\t\t_copyElement.style.display = \"none\";\n\t\t_body && _body.appendChild(_copyElement);\n\t\t_touchEventLookup = (function(types) { //we create an object that makes it easy to translate touch event types into their \"pointer\" counterparts if we're in a browser that uses those instead. Like IE10 uses \"MSPointerDown\" instead of \"touchstart\", for example.\n\t\t\tlet standard = types.split(\",\"),\n\t\t\t\tconverted = ((_tempDiv.onpointerdown !== undefined) ? \"pointerdown,pointermove,pointerup,pointercancel\" : (_tempDiv.onmspointerdown !== undefined) ? \"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel\" : types).split(\",\"),\n\t\t\t\tobj = {},\n\t\t\t\ti = 4;\n\t\t\twhile (--i > -1) {\n\t\t\t\tobj[standard[i]] = converted[i];\n\t\t\t\tobj[converted[i]] = standard[i];\n\t\t\t}\n\t\t\treturn obj;\n\t\t}(\"touchstart,touchmove,touchend,touchcancel\"));\n\t\tSVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(e) { //adds Chrome support\n\t\t\treturn e.getScreenCTM().inverse().multiply(this.getScreenCTM());","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/greensock/GSAP/blob/13e2b790546426a1a2e0e9b409f3f8dc6d6611f2/src/utils/PathEditor.js#L142-L178","documentation":"PathEditor's _initCore assigns gsap = gsap || core || _win.gsap || console.warn(\"Please gsap.registerPlugin(PathEditor)\"). If no gsap core is reachable (not loaded globally, not passed to _initCore, and registerPlugin never ran), it warns that registration is required and the editor cannot initialize.","triggerScenarios":"new PathEditor(...) without gsap.registerPlugin(PathEditor), module builds where gsap is not on window and no core was passed, or the plugin script loaded before gsap core.","commonSituations":"Module bundler setups where gsap isn't a global, forgetting registration with the Club GSAP PathEditor plugin, load-order mistakes in script tags, or using the plugin without the required GSAP membership build.","solutions":["Call gsap.registerPlugin(PathEditor) after importing gsap and the plugin","Ensure gsap core is loaded/evaluated before PathEditor's constructor runs","If using the internal API, pass the gsap instance to PathEditor._initCore(core)","Confirm your build includes PathEditor (Club GSAP plugin)"],"exampleFix":"// before\nimport { PathEditor } from 'gsap/PathEditor';\nconst editor = new PathEditor(pathElement);\n// after\nimport { gsap } from 'gsap';\nimport { PathEditor } from 'gsap/PathEditor';\ngsap.registerPlugin(PathEditor);\nconst editor = new PathEditor(pathElement);","handlingStrategy":"validation","validationCode":"import { gsap } from 'gsap';\nimport { PathEditor } from 'gsap/PathEditor';\ngsap.registerPlugin(PathEditor);\nif (!gsap.core.globals().PathEditor) throw new Error('PathEditor not registered / not available');","typeGuard":null,"tryCatchPattern":"try {\n  const editor = new PathEditor(el);\n} catch (e) {\n  console.error('PathEditor init failed — check gsap registration and license build', e);\n}","preventionTips":["Register PathEditor right after gsap import","Ensure gsap core loads before plugin code executes","Confirm the Club GSAP build includes PathEditor"],"tags":["gsap","plugin-registration","patheditor"],"backgroundTag":"missing-plugin-registration","analyzedSha":"13e2b790546426a1a2e0e9b409f3f8dc6d6611f2","analyzedAt":"2026-08-29T08:34:05.027Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}