Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid permission issues when using denon

I was running denon, which is like nodemon in node, but I'm getting permission issues even when I've manually specified the relevant flags (specifically --allow-net flag.)

How do I run my app with denon so I don't have to keep restarting?

like image 691
Melody Leonard Avatar asked Mar 19 '26 10:03

Melody Leonard


1 Answers

Without knowing the exact error it's hard to give you the correct answer, but denon is unstable, it has several issues.

One of those errors that you might be affecting you is if you're trying to watch a folder that you may not have ownership you'll get:

error: Uncaught PermissionDenied: Permission denied (os error 13)

for example, if I run denon on /tmp I get that error thrown, even if the folder has all permissions.

Even though nodemon works perfectly on /tmp.


My recommendation is to use nodemon until denon is stable or until there's a better tool for deno.

You can do so by using --exec flag

nodemon --exec deno run --allow-net index.ts

For convenience you can use nodemon.json with the following content:

{
  "execMap": {
    "js": "deno run --allow-net",
    "ts": "deno run --allow-net"
  },
  "ext": "js,json,ts"
}

And now just use: nodemon index.ts

like image 73
Marcos Casagrande Avatar answered Mar 22 '26 00:03

Marcos Casagrande