Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esm module lacks extensions in imports #182

Open
ybouane opened this issue Feb 23, 2025 · 0 comments
Open

Esm module lacks extensions in imports #182

ybouane opened this issue Feb 23, 2025 · 0 comments

Comments

@ybouane
Copy link

ybouane commented Feb 23, 2025

I use react-router v7 which uses Vite.
When I import the module via

import CodeEditor from '@uiw/react-textarea-code-editor';

It fails with error:
Cannot find module '.../node_modules/@uiw/react-textarea-code-editor/esm/Editor' imported from .../node_modules/@uiw/react-textarea-code-editor/esm/index.js

The reason is that it is required to have an extension in the import but the ESM build is missing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant