Denon does't doesn't watch
timonson opened this issue ยท 19 comments
Describe the bug
The watcher doesn't work anymore after updating both deno and denon. Neither in the terminal, where I run denon, are updates visible nor is the cmd
executed after changing files. The initial cmd
(when I start denon) is executed tho.
To Reproduce
{
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "deno run --unstable -A ./bundler.ts ./components.ts ./static/scripts",
"desc": "Run the bundler."
}
},
"watcher": {
"interval": 350,
"exts": ["ts", "html"],
"match": ["./myWebComponents/**/*.*"],
"skip": ["*/.git/*"]
}
}
I have typescript files for example in "./myWebComponents/navbar/navbar.ts".
Expected behavior
Denon should run the script and tell me in terminal that it updates when I change files.
Setup
- OS: linux, arch
- Deno version:
1.3.3
- Denon version:
v2.3.3
Additional context
I would be happy to add further information if required.
Thanks!
Is this still an issue?
I will investigate
Thanks :D If it helps:
Environment:
lsb_release -a
# => Distributor ID: Ubuntu
# => Description: Ubuntu 20.04.1 LTS
# => Release: 20.04
# => Codename: focal
deno --version
# => Deno 1.4.0
# => v8 8.7.75
# => Typescript 4.0.2
denon --version
# => [*] [main] v2.4.0
scripts.json
:
{
"$schema": "https://deno.land/x/denon/schema.json",
"allow": [
"run",
"env",
"net",
"write",
"read",
"plugin"
],
"scripts": {
"startDev": {
"cmd": "deno run -c ./tsconfig.json ./src/app.ts",
"desc": "Start Chopper Server (development)",
"env": {
"ENVIRONMENT": "development"
},
"log": "info",
"watch": true
}
},
"watcher": {
"interval": 350,
"exts": ["ts", "json"],
"match": ["./*.*", "./config/*", "./src/*"],
"skip": ["*/.git/*"]
}
}
Same issue here after upgrading from deno 1.2.3 to 1.4.0:
deno install --allow-read --allow-run --allow-write --allow-net -f -q --unstable https://deno.land/x/denon/denon.ts;
export PATH="/root/.deno/bin:$PATH"
echo starting denon
denon start
drash_server | โ
Successfully installed denon
drash_server | /root/.deno/bin/denon
drash_server | โน๏ธ Add /root/.deno/bin to PATH
drash_server | export PATH="/root/.deno/bin:$PATH"
drash_server | starting denon
drash_server exited with code 0
+1 mine watches but only for things on the root level, nothing with depth
This probably has to do with some regex global expansion updates in deno but for some reason it's difficult for me to replicate.
I've tried a lot of settings and nothing in a sub-directory is ever picked up
I'm running Deno 1.4.4
Could you guys install and test to make sure my pr worked before I release 2.4.2?
deno install -qAfr --unstable https://raw.githubusercontent.com/denosaurs/denon/main/denon.ts
Still not working for me.
lsb_release -a
# => Distributor ID: Ubuntu
# => Description: Ubuntu 20.04.1 LTS
# => Release: 20.04
# => Codename: focal
deno --version
# => Deno 1.4.2
# => v8 8.7.75
# => Typescript 4.0.3
denon --version
// => [*] [main] v2.4.1 (I sourced https://raw.githubusercontent.com/denosaurs/denon/main/denon.ts)
denon bin is running:
#!/bin/sh
# generated by deno install
deno "run" "--allow-read" "--allow-write" "--allow-net" "--allow-env" "--allow-run" "--allow-plugin" "--allow-hrtime" "--quiet" "--unstable" "https://raw.githubusercontent.com/denosaurs/denon/main/denon.ts" "$@"
Watcher:
"watcher": {
"interval": 350,
"exts": [
"ts",
"js",
"json"
],
"match": [
"*"
]
}
I will try again later tonight.
Thanks for the PR though, I bet it fixed something :D
Fixed for me, thank you!!
Still not working on windows
versions:
deno 1.4.6
denon 2.4.4
@lastqubit could you share your current working directory file tree, denon configuration file and a log of what happens when you try to run it with the logger.debug
config set to true?
@eliassjogreen the watcher works with json files but not js
@eliassjogreen what I said wasn't true, it's seems to work for files in the root dir but not in /src
dir root is:
denon.json
importmap.json
tsconfig.json
and then /src with .js files
{
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "deno run src/app.js",
"desc": "run my app.js file",
"allow": ["net", "read", "env", "write"],
"importmap": "importmap.json",
"unstable": true,
"log": "debug"
}
}
}
Debug log is a million lines, don't know what to look for
If you enable debugging like this:
{
"$schema": "https://deno.land/x/denon/schema.json",
"scripts": {
"start": {
"cmd": "deno run src/app.js",
"desc": "run my app.js file",
"allow": ["net", "read", "env", "write"],
"importmap": "importmap.json",
"unstable": true
}
},
"logging": {
"debug": true
}
}
you only get the denon debug log.
I tried that at first but I don't get any logs with that config. I only get:
denon start
[] [main] v2.4.4
[] [daem] watching path(s): .
[*] [daem] watching extensions: ts,tsx,js,jsx,json
[!] [#0] starting deno run --allow-net --allow-read --allow-env --allow-write --importmap importmap.json --unstable src/app.js
Check file:///.../src/app.js
It's working for me with watch
configuration
Could you guys install and test to make sure my pr worked before I release 2.4.2?
deno install -qAfr --unstable https://raw.githubusercontent.com/denosaurs/denon/main/denon.ts
I was having the exact same issue on 2.4.4 no matter what I did to the configuration. Installing the provided link fixed the issue for me. Seems like the bug is still an issue in latest release.