You might be trying to import icons from both v1 and v2:

To resolve this issue, we need to make sure that we’re using the correct version of Heroicons consistently throughout our project.

Since the error mentions that we’ve installed Heroicons v1, we need to ensure that we’ve done this:

npm install @heroicons/react@v1

Then in our component, we should import like this:

import {
    SearchIcon,
    PlusCircleIcon,
    UserGroupIcon,
    HeartIcon,
    PaperAirplaneIcon,
    MenuIcon
} from "@heroicons/react/outline";

If the error still persists, double-check the following:

1. Clear your npm cache by running npm cache clean –force.
2. Restart your development server.

Support On Demand!

                                         
ReactJS