Skip to content

Could not resolve "lucide-react" when using @rjsf/chakra-ui #4739

@nhim175

Description

@nhim175

Prerequisites

What theme are you using?

chakra-ui

Version

6.0.0-beta.14

Current Behavior

When using Chakra UI theme like below:

import Form from "@rjsf/chakra-ui";

it results in error:

Could not resolve "lucide-react"

    node_modules/@rjsf/chakra-ui/lib/AddButton/AddButton.js:4:25:
      4 │ import { PlusIcon } from 'lucide-react';

Expected Behavior

Able to use Chakra UI theme

Steps To Reproduce

  1. Install version 6.0.0-beta.14 npm install @rjsf/[email protected]
  2. Import the Form import Form from "@rjsf/chakra-ui";

Environment

- OS: Ubuntu 22.04
- Node: 22.14.0
- npm: 10.9.2

Anything else?

I think this can be fixed by moving lucide-react from devDependencies to dependencies
As a workaround, install lucide-react manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugchakra-uiChakra ui related theme issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions