greensock/GSAP · warning
ERROR: No velocity was defined for ${target} property: ${p}
Error message
ERROR: No velocity was defined for ${target} property: ${p} What it means
When building an inertia tween, each property needs a starting velocity. It can come from an explicit velocity value in vars or from live tracking data. If neither exists for a property, InertiaPlugin warns that no velocity was defined for that target/property and continues with undefined behavior for that property.
Source
Thrown at src/InertiaPlugin.js:276
p, curProp, curVal, unit, velocity, change1, end, change2, linkedProps;
vars = _processingVars;
_processingVars = 0;
//when there are linkedProps (typically "x,y" where snapping has to factor in multiple properties, we must first populate an object with all of those end values, then feed it to the function that make any necessary alterations. So the point of this first loop is to simply build an object (like {x:100, y:204.5}) for feeding into that function which we'll do later in the "real" loop.
linkedProps = _processLinkedProps(target, vars, getVal, resistance);
for (p in vars) {
if (!_reservedProps[p]) {
curProp = vars[p];
_isFunction(curProp) && (curProp = curProp(index, target, targets));
if (_isNumber(curProp)) {
velocity = curProp;
} else if (_isObject(curProp) && !isNaN(curProp.velocity)) {
velocity = +curProp.velocity;
} else {
if (tracker && tracker.isTracking(p)) {
velocity = tracker.get(p);
} else {
console.warn("ERROR: No velocity was defined for " + target + " property: " + p);
}
}
change1 = _calculateChange(velocity, duration);
change2 = 0;
curVal = getVal(target, p);
unit = _getUnit(curVal);
curVal = parseFloat(curVal);
if (_isObject(curProp)) {
end = curVal + change1;
if ("end" in curProp) {
curProp = _parseEnd(curProp, (linkedProps && p in linkedProps) ? linkedProps : end, curProp.max, curProp.min, p, vars.radius, velocity);
}
if (("max" in curProp) && +curProp.max < end) {
if (preventOvershoot || curProp.preventOvershoot) {
change1 = curProp.max - curVal;
} else {
change2 = (curProp.max - curVal) - change1;
}View on GitHub (pinned to 13e2b79054)
Solutions
- Provide velocity explicitly: inertia:{x:{velocity:500, end:1000}}
- Call InertiaPlugin.track(target) and ensure isTracking(p) for each inertia property
- Use Draggable with inertia:true so tracking/throwing is wired automatically
- Match property names between track() and the inertia vars
Example fix
// before
gsap.to(el, { inertia: { x: { end: 300 } } }); // no velocity source
// after
InertiaPlugin.track(el);
gsap.to(el, { inertia: { x: { velocity: "auto", end: 300 } } });
// or explicit:
gsap.to(el, { inertia: { x: { velocity: 400, end: 300 } } }); Defensive patterns
Strategy: validation
Validate before calling
Object.keys(inertiaVars).forEach(p => { const prop = inertiaVars[p]; if (!(typeof prop === 'object' && !isNaN(prop.velocity)) && !InertiaPlugin.getByTarget?.(target)?.isTracking?.(p)) { console.warn('No velocity for ' + p); } }); Type guard
const hasVelocitySource = (target, p, curProp) => (curProp && typeof curProp === 'object' && !isNaN(curProp.velocity)) || InertiaPlugin.track && !!tracker;
Prevention
- Always supply velocity explicitly when not relying on tracking
- Keep tracked property names identical to tweened property names
- Track the target right before the throw/inertia tween executes
When it happens
Trigger: gsap.to(el, {inertia:{x:{end:500}}}) where neither a velocity nor InertiaPlugin tracking provides x's velocity; using property names that differ from the tracked ones (e.g. tracking x but tweening left).
Common situations: Hand-written inertia configs omitting velocity; transformed properties tracked under different names than the tween props; Draggable's tracking thrown away before the throw tween runs.
Related errors
- No inertia tracking on ${target}. InertiaPlugin.track(target
- GSDevTools error: invalid animation.
- Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)
- Please gsap.registerPlugin(CustomEase, CustomBounce)
- Please gsap.registerPlugin(CustomEase)
AI-assisted analysis of greensock/GSAP@13e2b79054 (2026-08-29).
Data as JSON: /api/errors/3e944c608864fc24.
Report an issue: GitHub.