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

Nextjs app directory not working with react-splide #76

Open
2 tasks done
adityanrlhmd opened this issue Nov 23, 2023 · 2 comments
Open
2 tasks done

Nextjs app directory not working with react-splide #76

adityanrlhmd opened this issue Nov 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@adityanrlhmd
Copy link

adityanrlhmd commented Nov 23, 2023

Checks

Version

0.7.12

Description

When i build next js 14

Type error: Could not find a declaration file for module '@splidejs/react-splide'. '/Users/aditya/Desktop/Office/react/b2b-web/node_modules/@splidejs/react-splide/dist/js/react-splide.esm.js' implicitly has an 'any' type.
There are types at '/Users/aditya/Desktop/Office/react/b2b-web/node_modules/@splidejs/react-splide/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@splidejs/react-splide' library may need to update its package.json or typings.

Reproduction Link

No response

Steps to Reproduce

used in client components Next 14

Expected Behaviour

Work with nextjs 14 to build prod

@adityanrlhmd adityanrlhmd added the bug Something isn't working label Nov 23, 2023
@ddumst
Copy link

ddumst commented Jan 10, 2024

@adityanrlhmd yo bro! you can add a global.d.ts and paste this line:

declare module '@splidejs/react-splide';

Will type splide as any, but the project will run and build

@patrickn2
Copy link

Once the developer is not updating this package anymore, I forked it and fixed the issue exporting the types that are not being exported.
https://github.com/patrickn2/react-splide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants