Hari
Hari

Reputation: 13

Denon installation failed in Deno v1.18.0

I tried installing denon for running my deno script

I used the following command from their docs,

deno install -qAf --unstable https://deno.land/x/denon/denon.ts

And the command failed with,

error: TS2345 [ERROR]: Argument of type '"any" | "access" | "create" | "modify" | "remove" | "other"' is not assignable to parameter of type 'FileAction'.
  Type '"other"' is not assignable to type 'FileAction'.
            this.#changes[path].push(kind);
                                     ~~~~
    at https://deno.land/x/[email protected]/src/watcher.ts:150:38

P.S. If this is an expected behavior is there any alternative for denon?

Upvotes: 1

Views: 417

Answers (2)

ninhjs.dev
ninhjs.dev

Reputation: 8583

If you already have nodemon, you do not need denon at all. nodemon can watch for file changes and restart the deno process for you.

Consider a dev command below, adjust the deno arguments as needed.

nodemon --watch src --signal SIGHUP --exec deno run --allow-all --unstable --inspect src/index.ts

Upvotes: 1

Zwiers
Zwiers

Reputation: 3668

Edit: This issue has been fixed in denon v2.5.0

Original answer:

This is a known bug in denon, an official fix will be released soon but in the meantime there is a patch which you can install to workaround the issue, see this comment on GitHub:

deno install -qAf --unstable https://raw.githubusercontent.com/nnmrts/denon/patch-4/denon.ts

You can also downgrade to a version released before the bug was introduced.

Upvotes: 3

Related Questions