-
Notifications
You must be signed in to change notification settings - Fork 36
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
Uncaught TypeError: useDragDropContext is not a function or its return value is not iterable at createPointerSensor #78
Comments
Same error |
So there is no solution if i want to use the latest version of solid and solid-dnd? Because I am using a monorepo that all use the latest version of solid |
solid-dnd works with solidjs 1.5 and greater (as per the package.json declaration). The issue you are experiencing is likely more due to your build / dev / vite setup than incompatibility between solid-dnd and solidjs. For example, the https://solid-dnd.com website source is here and you can see it using the latest solidjs 1.6 without issue. Have you tried the suggested fix in the issues I referenced? |
Tomorrow, i'll try to create an empty project to see if the example in the works with typescript and the fix showed above. |
@martinpengellyphillips this is my vite.config.js
|
and this is my package.json
|
i have successfully built my project using "vite build" and the drag and drop is work but when I'm using vite dev ("vite"), I have an error saying "React is undefined", that is weird |
I think I saw something about that on the solidjs discord channel - might be worth asking there? Other things might be to check which version of vite-plugin-solid you have - I see a few references to a react undefined error in the issues there. |
Same error. Any fix? |
Please provide a link to the repository demonstrating the error. Otherwise there are too many variables to consider (most of which are unrelated to solid-dnd itself). |
I mean, I install the package, I copy one of the examples, I get error. Idk what to say. I can set up an example in a bit |
https://stackblitz.com/edit/github-sadxvo?file=src%2FApp.tsx |
seems like adding: optimizeDeps: {
extensions: ['jsx'],
}, to |
Which other packages are you referring to? Perhaps we can learn something from their setup? |
I'm having the same issue--I copied over the vertical sortable example from https://solid-dnd.com/ and get the error:
I can confirm that adding:
to my |
Looks like #80 will fix this when merged. |
I wonder if this is a recent solidjs update causing it? |
@martinpengellyphillips Mmmh just tried the example with a new Solid template with everything up to date and there is no issue. Everything seems to work as intended. I'll have to dig deeper to find the problem. I'll post here if it's from |
I was refactoring and the error was because I forgot to re-add the parent component from the example, my bad ! |
I just copied the example Board from the web site, but using typescript
my dependencies are:
"@thisbeyond/solid-dnd": "^0.7.3",
"solid-js": "~1.6.9",
The text was updated successfully, but these errors were encountered: