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
In your dragula.js there is a windows object defined if it does not exist. Could you also define the document object?
Otherwise, we are getting the error:
Call to Node module failed with error: ReferenceError: document is not defined
The text was updated successfully, but these errors were encountered:
I was also trying to use (at least just require) dragula under a nodejs context. To fix this issue there are 2 appearances of document, which is not defined:
Inside the crossvent dependency: they fixed this internally in latest version 1.5.5. dragula is using version 1.5.4.
Inside the dragula.js file. Here the usage is much more coupled to fix easily.
While the first issue can be fixed easily, the second can't. I'm going to try defining a fake document global before requiring dragula and will comment back how it turns out.
gristow
added a commit
to gristow/dragula
that referenced
this issue
Mar 12, 2022
Moves references to document within functions so that dragula can be required/imported in a non-browser context. (Does not enable server-side rendering.)
In your dragula.js there is a windows object defined if it does not exist. Could you also define the document object?
Otherwise, we are getting the error:
The text was updated successfully, but these errors were encountered: