-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Describe the bug
This library can only be used in the browser because among other this it requires the window object.
To Reproduce
Steps to reproduce the behavior:
mkdir testcd testnpm i jsvotableecho 'const JsVotable = require("./node_modules/jsvotable/JsVotable.min.js")' > test.jsnode test.js
or alternatively:
echo 'const JsVotable = require("./node_modules/jsvotable/src/JsVotable.js")' > test.jsnode test.js
Expected behavior
The script should be executed. (and nothing should happen)
Actual behavior
Error message appears:
ReferenceError: window is not defined
at test/node_modules/jsvotable/JsVotable.min.js:1:31253
or alternativly
ReferenceError: define is not defined
at Object.<anonymous> (test/node_modules/jsvotable/src/JsVotable.js:22:2)
Desktop
- OS: macOS
- Browser: no browser (node.js)
- Version: all versions of node js
Additional context
It would be very nice
🥺
👉👈