Skip to content
New issue

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

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

Already on GitHub? # to your account

Failed to resolve entry for package "react-windowed-select" on version 5.1.1 #127

Open
ruisheng95 opened this issue Nov 17, 2023 · 3 comments

Comments

@ruisheng95
Copy link

Hello, on react-windowed-select version 5.1.1 running with Vite, it will encounter an error of Failed to resolve entry for package "react-windowed-select". The package may have incorrect main/module/exports specified in its package.json.. It seems that the changes in #116 is referring a nonexistent file of dist/index.js

I tried replacing the module field inside package.json to dist/main.js and it seem to fix the error. Though I wasn't sure is this the right way of fixing it, as my knowledge on Javascript bundling is minimal.

Here is a demo of the error.

@ak274
Copy link

ak274 commented Jan 4, 2024

not working with vite

@Bliqui
Copy link

Bliqui commented Jan 25, 2024

Same thing with React Native web

@lyaonov
Copy link

lyaonov commented Feb 7, 2024

this helped me make friends with vite and react-windowed-select

add this to vite.config.ts

export default defineConfig({
    ....
    resolve: {
        alias: {
            'react-windowed-select': 'react-windowed-select/dist/main.js',
        },
    },
    ...
    }

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

Successfully merging a pull request may close this issue.

4 participants