-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Description
Env : Next.JS 15.5.4, Tailwind 4.1.14, motion ^12.23.24
when running:
npm run build
Got this error:
./src/components/motion-primitives/glow-effect.tsx:142:7
Type error: Type '{ background: string[]; transition: { isSync?: boolean | undefined; delay?: number | undefined; elapsed?: number | undefined; driver?: Driver | undefined; type?: AnimationGeneratorType | undefined; ... 32 more ...; onStop?: (() => void) | undefined; } | { ...; }; } | ... 4 more ... | { ...; }' is not assignable to type 'boolean | TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined'.
Type '{ background: string[]; transition: { isSync?: boolean; delay?: number; elapsed?: number; driver?: Driver; type?: AnimationGeneratorType; ... 32 more ...; onStop?: () => void; } | { ...; }; }' is not assignable to type 'boolean | TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined'.
Type '{ background: string[]; transition: { isSync?: boolean; delay?: number; elapsed?: number; driver?: Driver; type?: AnimationGeneratorType; ... 32 more ...; onStop?: () => void; } | { ...; }; }' is not assignable to type 'TargetAndTransition'.
Type '{ background: string[]; transition: { isSync?: boolean; delay?: number; elapsed?: number; driver?: Driver; type?: AnimationGeneratorType; ... 32 more ...; onStop?: () => void; } | { ...; }; }' is not assignable to type '{ transition?: Transition<any> | undefined; transitionEnd?: ResolvedValues | undefined; }'.
Types of property 'transition' are incompatible.
Type '{ isSync?: boolean | undefined; delay?: number | undefined; elapsed?: number | undefined; driver?: Driver | undefined; type?: AnimationGeneratorType | undefined; ... 32 more ...; onStop?: (() => void) | undefined; } | { ...; }' is not assignable to type 'Transition<any> | undefined'.
Type '{ repeat: number; duration: number; ease: string; }' is not assignable to type 'Transition<any> | undefined'.
Type '{ repeat: number; duration: number; ease: string; }' is not assignable to type 'TransitionWithValueOverrides<any>'.
Type '{ repeat: number; duration: number; ease: string; }' is not assignable to type 'ValueAnimationTransition<any>'.
Types of property 'ease' are incompatible.
Type 'string' is not assignable to type 'Easing | Easing[] | undefined'.
140 | } as React.CSSProperties
141 | }
> 142 | animate={animations[mode]}
| ^
143 | className={cn(
144 | 'pointer-events-none absolute inset-0 h-full w-full',
145 | 'scale-[var(--scale)] transform-gpu',
Next.js build worker exited with code: 1 and signal: null
I fixed it by downgrading motion to ^11.12.0 as found in motion-primitives repo. Official documentation advises to install latest motion lib.
Cordially,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels