I am trying to find the mouse position using just Node JS but all the answers on stack over flow point to using robot which gives me an error message. Anyone know another way?
But what do I do to download (I am still very new to packages on replit)
Put this command in the shell : npm i mouse-position
2 Likes
I ran the npm i mouse-position
in shell and it gave me no error message so I tried using the code
let mouse = mousePosition()
and it gave an error mousePosition not defined. Is there another step or something?
Did you call it like const mousePosition = require("mouse-position");
at the top?
1 Like
It works! Thank you for you help.
1 Like