Xetera / ghost-cursor

🖱️ Generate human-like mouse movements with puppeteer or on any 2D plane
MIT License
1.03k stars 120 forks source link

Uncaught SyntaxError: Cannot use import statement outside a module #100

Closed MacVej closed 4 months ago

MacVej commented 1 year ago

i keep getting the following error: Uncaught SyntaxError: Cannot use import statement outside a module when trying to use it together with puppeteer - is their a version thats compatible with the current puppeteer version?

captainjackrana commented 1 year ago

You can import ghost-cursor in the following way

const { createCursor } = require('ghost-cursor');

const cursor = createCursor(page);