-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
TypeScript error:
Interface 'MotionStyle' cannot simultaneously extend types
'MakeMotionHelper<Omit<CSSProperties, "perspective" | "rotate" | "scale">>'
and 'MakeMotionHelper<TransformProperties>'.
Named property 'x' of these types is not identical.
This occurs when using motion with React 19 and skipLibCheck: false.
Reproduction (CodeSandbox or minimal project)
package.json
{
"dependencies": {
"react": "^19.2.1",
"react-dom": "^19.2.1",
"motion": "^12.23.25",
"next": "^15.5.7"
},
"devDependencies": {
"@types/react": "^19",
"@types/react-dom": "^19",
"typescript": "^5"
}
}Component
import { motion, AnimatePresence } from "motion/react";
export default function Test() {
return <motion.div initial={{ opacity: 0 }}>Test</motion.div>;
}tsconfig.json
{
"compilerOptions": {
"skipLibCheck": false,
"strict": true
}
}Steps to reproduce
- Create a Next.js 15.5.7 project using React 19.2.1.
- Install
motion@12.23.25and@types/react@19. - Import components from
motion/react. - Set
"skipLibCheck": falsein tsconfig.json. - Run
next build. - TypeScript throws error TS2320 from Motion’s type definitions.
Expected behavior
TypeScript compilation should pass without errors when using Motion with React 19.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working