littledivy / autopilot-deno

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

`Uncaught SyntaxError: Identifier 'path1' has already been declared` when running bundled/compiled code (upstream) #48

Closed nnmrts closed 2 years ago

nnmrts commented 2 years ago

Create the file test.js with:

import AutoPilot from "https://deno.land/x/autopilot/mod.ts";

const pilot = new AutoPilot();

Run this:

deno run -A --unstable test.js

Output should be nothing, everything's fine. Now run this:

deno bundle --unstable test.js test.bundle.js

And then this:

deno run -A --unstable test.bundle.js

Output will be:

error: Uncaught SyntaxError: Identifier 'path1' has already been declared
function path1(url, ns) {
^
    at <anonymous> (file:///path/to/test.bundle.js:1723:1)
nnmrts commented 2 years ago

Seems like this is fixed by https://github.com/denoland/deno/pull/13025.

This issue can be closed once that PR gets released and everything works.

nnmrts commented 2 years ago

Yup, seems to be fixed.