littledivy / autopilot-deno

:rocket: Cross-platform desktop automation module for Deno.
https://autopilot.mod.land
MIT License
492 stars 15 forks source link

Error at importing Autopilot with M1 Mac #54

Open greenmoonslug opened 2 years ago

greenmoonslug commented 2 years ago

file:

//autopilot1.dn.js
import * as autopilot from "https://deno.land/x/autopilot@0.4.0/mod.ts";

when I run this:

% deno --unstable run --allow-ffi --allow-env --allow-read autopilot1.dn.js
error: Uncaught (in promise) TypeError: Error parsing args at position 0: data did not match any variant of untagged enum ForeignSymbol
  return Deno.dlopen(file.path, symbols);
              ^
    at new DynamicLibrary (deno:ext/ffi/00_ffi.js:286:39)
    at Object.dlopen (deno:ext/ffi/00_ffi.js:390:12)
    at Module.prepare (https://deno.land/x/plug@0.4.0/plug.ts:77:15)
    at async https://deno.land/x/autopilot@0.4.0/bindings/bindings.ts:8:14

Note

According to README.md, the command should be:

% deno run --unstable --allow-ffi autopilot1.dn.js

Though, Deno.dlopen isn't defined when I put --unstable after run. When I just put --unstable before run, that requests:

And when I arrow all of these, same error causes as with --allow-env --allow-read.