You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: Originally reported this as an issue with the package leva, however after looking a bit deeper it's a problem with @use-gesture/react. Updated issue details and title to reflect this.
Quick checklist
I am using the latest version of Snowpack and all plugins.
What package manager are you using?
Yarn on WSL and Codesandbox in Chrome
What operating system are you using?
WSL and Codesandbox
Describe the bug
Attempting to render a very simple react app with a @use-gesture/reactuseDrag hook fails with Unhandled Runtime Error: Uncaught TypeError: Cannot convert undefined or null to object. This can demonstrated with an app containing this index.jsx:
Alternatively create a local react project with this index.jsx described above.
Compare this to (a) this sandbox (which uses the default codesandbox react template) or a local CRA with the same index.tsx. You will not get the error and the word Test can be dragged around.
looeee
changed the title
🐛 BUG: Attemping to render Leva GUI component results in TypeError while the same code renders correctly in other build systems
🐛 BUG: Attemping to render @use-gesture/react hook results in TypeError while the same code renders correctly in other build systems
Feb 27, 2022
EDIT: Originally reported this as an issue with the package leva, however after looking a bit deeper it's a problem with @use-gesture/react. Updated issue details and title to reflect this.
Quick checklist
What package manager are you using?
Yarn on WSL and Codesandbox in Chrome
What operating system are you using?
WSL and Codesandbox
Describe the bug
Attempting to render a very simple react app with a @use-gesture/react
useDrag
hook fails withUnhandled Runtime Error: Uncaught TypeError: Cannot convert undefined or null to object
. This can demonstrated with an app containing thisindex.jsx
:The same
index.jsx
and same packages running on CRA correctly render the app.This can also be demonstrated on codesandbox, links below.
Result:
Expected result (as seen with CRA):
The word "Test" should appear and can be dragged around with the mouse.
Full error:
Steps to reproduce
index.jsx
described above.Compare this to (a) this sandbox (which uses the default codesandbox react template) or a local CRA with the same
index.tsx
. You will not get the error and the wordTest
can be dragged around.Package versions used:
Link to minimal reproducible example (optional)
https://codesandbox.io/s/react-snowpack-forked-o6rhl6?file=/src/index.jsx:0-555
The text was updated successfully, but these errors were encountered: