air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.53k stars 779 forks source link

Air keep watching directories I tell it not to. (ie: Node Modules) #447

Closed Panderson96 closed 11 months ago

Panderson96 commented 11 months ago

Air keeps checking the 'node modules' directory (path: /web/node modules) even when I exclude it. I've tried exluding the absolute path as well

# .air.toml
root = "."
tmp_dir = "tmp"

[build]
cmd = "go build -o ./tmp/main ."
bin = "tmp/main"

[watch]
includes = [
  "*.go",
  "types/*.go",
]
exclude_dir = ["web/node_modules", "tmp"]
exclude_file = []
exclude_regex = []
delay = 1000
stop_signal = "SIGTERM"
restart_signal = "SIGUSR2"

[log]
level = "debug"
target = "air_logs.log"
dir = "logs"

[watcher]
use_polling = false
UPSxACE commented 7 months ago

How did you solve it??

art3xias23 commented 3 months ago

I was having an issue with this yesterday.

I believe I was using some .air.toml file I copied from online and I could not ignore the node_modules folder.

I started with a fresh project. I ran

air init and now when i specify the node_modules folder in my .ait.toml file it works

image