chat-ui-kit-react icon indicating copy to clipboard operation
chat-ui-kit-react copied to clipboard

The requested module '/node_modules/prop-types/index.js' does not provide an export named 'default'

Open Lodjuret2001 opened this issue 2 months ago • 0 comments

Hi there! I'm encountering an issue while trying to integrate my npm package, which depends on the chat-ui-kit-react package, into a Vite React project.

Problem:

When testing my package in a Vite React project, I encounter a SyntaxError related to the prop-types module. The error message indicates that the module does not provide a default export. Here's the specific error:

Uncaught SyntaxError: The requested module '/node_modules/prop-types/index.js' does not provide an export named 'default' (at Status.js)

Investigation:

Upon further investigation, I found that modifying the import statements within all files inside the "es", folder to use the wildcard import syntax.

(import PropTypes from "prop-types" to ``import * as PropTypes from "prop-types" ) resolved the issue with prop-types. (import classNames from "classnames" to ``import * as classNames from "classnames" ) resolved the issue with classnames.

However, this led to a similar issue with the @fortawesome/free-solid-svg-icons module, where a specific export (faArrowDown) could not be found.

Next Steps:

I'm unsure how to proceed with resolving the issue related to @fortawesome/free-solid-svg-icons. I've ensured that all paths from my OpenReactBot component are correct and that all dependencies are correctly installed in the React app.

Here is my links to my GitHub repositories for reference:

I would greatly appreciate any guidance or assistance on how to resolve this issue. Thank you for your help!

Lodjuret2001 avatar Apr 25 '24 16:04 Lodjuret2001