Skip to content

[BUG] vscode intellisense import: not listing motion from motion/react #3432

@laurentlahmy

Description

@laurentlahmy

2. Describe the bug

vscode doesn't know how to auto-import the motion import from motion/react.
intellisense does not list motion from motion/react after creating a <motion.div> element

I have to manually type

 import { motion } from "motion/react"

even though motion is installed as a dependency

other imports from motion/react will be listed such as MotionConfig but not "motion".

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/89gtkc

4. Steps to reproduce

Steps to reproduce the behavior:

  1. type <motion.div>here</motion.div>
  2. use the intellisense (control space at the end of "motion") to auto import motion, it won't list it.

5. Expected behavior

Intellisense should help with importing motion by listing it and selecting it using tab should create the import. This is what I commonly use for imports

6. Video or screenshots

intellisense (control space) at the end of "motion":

Image

7. Environment details

macOS, chrome/brave, tanstack router, motion 12+, react 19.2+, latest vscode

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions