Open Lauwed opened 10 months ago
In my case, this issue is caused by next.js new version using moduleResolution bundler
by default. My old next.js project is working and I realized that it used moduleResolution node
.
I looked at @splidejs/react-splide package.json js and it doesn't have export.types value yet.
It's already fixed just need to wait to be merged https://github.com/Splidejs/react-splide/pull/73/files related issue https://github.com/Splidejs/react-splide/issues/72
temporary solution https://github.com/Splidejs/splide/issues/1179
In my case, this issue is caused by next.js new version using moduleResolution
bundler
by default. My old next.js project is working and I realized that it used moduleResolutionnode
. I looked at @splidejs/react-splide package.json js and it doesn't have export.types value yet.It's already fixed just need to wait to be merged https://github.com/Splidejs/react-splide/pull/73/files related issue Splidejs/react-splide#72
temporary solution #1179
hi has tis been merged, its july 2024 and im having the same issue
I am also facing the same issue in July 2024
same here
@zanuarmirza That PR never got merged. Pls @NaotoshiFujita, could this be resolved? Missing types
field in exports
makes this awesome lib unusable in TypeScript ESM environments. Thanks!
Today is July 2024 and the problem still exist
same here
i tried to ignore it and it worked, temporary
Checks
Version
^0.7.12
Description
Hello !
I found nothing on internet so I decided to post it here. Sorry if it is not the right place, please tell me where I can find help if it is not.
I have a NextJS project with Storybook (I don't think this is because of it, but we never know) and Typescript. When I try to import SplideJS React, I have an error.
When trying to build my project through Vercel I have this Typesript error :
One solution possible is to put
strict
tofalse
intsconfig.json
, but I think this is a bad idea.Here is my
package.json
:And the code of my component :
I created a new repo to see if it's working, but it's not https://github.com/Lauwed/test-splide-ts-error I also tried from scratch without Storybook. So it should not be the problem.
Reproduction Link
https://codesandbox.io/p/github/Lauwed/test-splide-ts-error/main?file=%2FREADME.md&workspaceId=9a62f4c3-29d3-4468-bb9a-f4c1f6b8680f
Steps to Reproduce
npx storybook@latest init
and following those instructions : https://storybook.js.org/recipes/nexttsconfig.json
(For required to use Storybook)Expected Behaviour
Should not have the Typescript error when importing SplideJS