{"record":{"id":"70c2e7d868b61268","repo":"greensock/GSAP","slug":"no-inertia-tracking-on-target-inertiaplugin-tr","errorCode":null,"errorMessage":"No inertia tracking on ${target}. InertiaPlugin.track(target) first.","messagePattern":"No inertia tracking on (.+?)\\. InertiaPlugin\\.track\\(target\\) first\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/InertiaPlugin.js","lineNumber":242,"sourceCode":"\t\t\t_coreInitted = 1;\n\t\t}\n\t};\n\n\n\nexport const InertiaPlugin = {\n\tversion: \"3.15.0\",\n\tname: \"inertia\",\n\tregister(core) {\n\t\tgsap = core;\n\t\t_initCore();\n\t},\n\tinit(target, vars, tween, index, targets) {\n\t\t_coreInitted || _initCore();\n\t\tlet tracker = _getTracker(target);\n\t\tif (vars === \"auto\") {\n\t\t\tif (!tracker) {\n\t\t\t\tconsole.warn(\"No inertia tracking on \" + target + \". InertiaPlugin.track(target) first.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvars = tracker.getAll();\n\t\t}\n\t\tthis.styles = _getStyleSaver && typeof(target.style) === \"object\" && _getStyleSaver(target);\n\t\tthis.target = target;\n\t\tthis.tween = tween;\n\t\t_processingVars = vars; // gets swapped inside _calculateTweenDuration() if there's a function-based value encountered (to avoid double-calling it)\n\t\tlet cache = target._gsap,\n\t\t\tgetVal = cache.get,\n\t\t\tdur = vars.duration,\n\t\t\tdurIsObj = _isObject(dur),\n\t\t\tpreventOvershoot = vars.preventOvershoot || (durIsObj && dur.overshoot === 0),\n\t\t\tresistance = _getNumOrDefault(vars, \"resistance\", _config.resistance),\n\t\t\tduration = _isNumber(dur) ? dur : _calculateTweenDuration(target, vars, (durIsObj && dur.max) || 10, (durIsObj && dur.min) || 0.2, (durIsObj && \"overshoot\" in dur) ? +dur.overshoot : preventOvershoot ? 0 : 1, true),\n\t\t\tp, curProp, curVal, unit, velocity, change1, end, change2, linkedProps;\n\t\tvars = _processingVars;\n\t\t_processingVars = 0;","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/greensock/GSAP/blob/13e2b790546426a1a2e0e9b409f3f8dc6d6611f2/src/InertiaPlugin.js#L224-L260","documentation":"InertiaPlugin's \"auto\" vars mode reads previously recorded velocity data via InertiaPlugin.track(). If the target was never tracked, init cannot compute inertia values and warns you to call InertiaPlugin.track(target) first, then returns without applying inertia.","triggerScenarios":"Using inertia:{...} or throwProps with vars set to \"auto\" on a target that was never passed to InertiaPlugin.track(target); tracking a different element than the tween's target.","commonSituations":"Draggable demos relying on auto inertia without track(); refactored code where the tracked target reference changed (e.g. querySelectorAll order mismatch); forgetting that \"auto\" requires prior tracking.","solutions":["Call InertiaPlugin.track(target) before creating the inertia tween","Register the plugin: gsap.registerPlugin(InertiaPlugin) (or Draggable with inertia:true)","Pass explicit velocity/end values instead of \"auto\"","Verify the tracked object identity matches the tween target"],"exampleFix":"// before\ngsap.to(box, { inertia: \"auto\" }); // never tracked\n// after\nInertiaPlugin.track(box);\ngsap.to(box, { inertia: \"auto\" });","handlingStrategy":"validation","validationCode":"if (inertiaVars === 'auto') { InertiaPlugin.track(target); }","typeGuard":"const isTracked = (target) => { try { InertiaPlugin.track(target); return true; } catch { return false; } };","tryCatchPattern":null,"preventionTips":["Call InertiaPlugin.track(target) immediately after creating Draggables","Verify the tracked object is the exact same reference used in the tween","Prefer explicit velocity values when tracking lifecycle is unclear"],"tags":["gsap","inertia","velocity-tracking"],"backgroundTag":"missing-track-before-inertia","analyzedSha":"13e2b790546426a1a2e0e9b409f3f8dc6d6611f2","analyzedAt":"2026-08-29T08:34:05.027Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}