{"record":{"id":"b32422c4b697c9e3","repo":"greensock/GSAP","slug":"please-gsap-registerplugin-draggable","errorCode":null,"errorMessage":"Please gsap.registerPlugin(Draggable)","messagePattern":"Please gsap\\.registerPlugin\\(Draggable\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/Draggable.js","lineNumber":603,"sourceCode":"\t\t\t\tfor (let p in _lookup) {\n\t\t\t\t\tif (_lookup[p].isPressed) {\n\t\t\t\t\t\t_lookup[p].endDrag();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tgsap = _coreInitted = _getGSAP();\n\t\t}\n\t\tif (gsap) {\n\t\t\tInertiaPlugin = gsap.plugins.inertia;\n\t\t\t_context = gsap.core.context || function() {};\n\t\t\t_checkPrefix = gsap.utils.checkPrefix;\n\t\t\t_transformProp = _checkPrefix(_transformProp);\n\t\t\t_transformOriginProp = _checkPrefix(_transformOriginProp);\n\t\t\t_toArray = gsap.utils.toArray;\n\t\t\t_getStyleSaver = gsap.core.getStyleSaver;\n\t\t\t_supports3D = !!_checkPrefix(\"perspective\");\n\t\t} else if (required) {\n\t\t\tconsole.warn(\"Please gsap.registerPlugin(Draggable)\");\n\t\t}\n\t};\n\n\n\n\n\n\nclass EventDispatcher {\n\n\tconstructor(target) {\n\t\tthis._listeners = {};\n\t\tthis.target = target || this;\n\t}\n\n\taddEventListener(type, callback) {\n\t\tlet list = this._listeners[type] || (this._listeners[type] = []);\n\t\tif (!~list.indexOf(callback)) {","sourceCodeStart":585,"sourceCodeEnd":621,"githubUrl":"https://github.com/greensock/GSAP/blob/13e2b790546426a1a2e0e9b409f3f8dc6d6611f2/src/Draggable.js#L585-L621","documentation":"Draggable's _initCore could not find a valid gsap core (gsap undefined, or missing registerPlugin/core APIs). Since Draggable is a plugin that patches into gsap, it warns that gsap.registerPlugin(Draggable) is required. `required` limits the warning to actual Draggable instantiation paths.","triggerScenarios":"Calling Draggable.create() when gsap was never registered with the plugin; gsap script not loaded or loaded after Draggable; custom gsap build lacking expected utilities; window undefined.","commonSituations":"Using Draggable from gsap/all but forgetting registerPlugin; script tag ordering in HTML; mixed ESM/UMD gsap copies; SSR rendering a component that creates Draggables.","solutions":["Call gsap.registerPlugin(Draggable) before Draggable.create()","Ensure the gsap core script loads before Draggable","Import consistently: `import { gsap, Draggable } from 'gsap/all'`","Guard drag initialization behind browser checks in SSR"],"exampleFix":"// before\nimport { Draggable } from 'gsap/all';\nDraggable.create('.handle');\n// after\nimport { gsap, Draggable } from 'gsap/all';\ngsap.registerPlugin(Draggable);\nDraggable.create('.handle');","handlingStrategy":"validation","validationCode":"if (typeof gsap === 'undefined' || !gsap.registerPlugin) {\n  throw new Error('Draggable requires gsap core');\n}\ngsap.registerPlugin(Draggable);","typeGuard":"function draggableReady() {\n  return typeof gsap !== 'undefined' && typeof Draggable !== 'undefined' && typeof gsap.registerPlugin === 'function';\n}","tryCatchPattern":null,"preventionTips":["Register Draggable at startup before Draggable.create()","Ensure gsap core script loads before plugin scripts","Guard browser-only code in SSR","Use one consistent gsap import path"],"tags":["gsap","plugin-registration","draggable"],"backgroundTag":"gsap-plugin-not-registered","analyzedSha":"13e2b790546426a1a2e0e9b409f3f8dc6d6611f2","analyzedAt":"2026-08-29T08:34:05.027Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}