Giter Club home page Giter Club logo

Comments (17)

notfilippo avatar notfilippo commented on May 12, 2024

the client folder you mentioned should be already matched by "*.*" by default, so it seems strange. Denon by default watches all files on the cwd. Also denon operates with glob file patterns with the deno stdlib implementation. You should specify client folder not as "./client/*" but as "client/*"

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

Specifying "client/*" does not work either. 👎

from denon.

eliassjogreen avatar eliassjogreen commented on May 12, 2024

Could you run with the --debug flag and post the logs?

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

Running: denon run -L debug --allow-read --allow-net server.ts generates a giant log
Running without -L debug generates the following lines:

[denon] v2.0.2
[denon] watching path(s): . client/*
[denon] watching extensions: jsx,tsx,ts,js,json,html
[denon] starting deno run --allow-read --allow-net server.ts
Compile file:///mnt/c/Users/ubuntu/Documents/web/deno-py-websocket/server.ts

from denon.

eliassjogreen avatar eliassjogreen commented on May 12, 2024

And what happens after you change a file? (the large debug log might help if you want to send it)

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

When I change a file in . it works but when I change it in client/* dir nothing happens.

from denon.

eliassjogreen avatar eliassjogreen commented on May 12, 2024

Could you run denon run -L debug --allow-read --allow-net server.ts > log.txt and send over the log?

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

1.log

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

This still seem to be unresolved in 2.20, does anyone else have this issue? Thx

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

I believe this is a Deno.watchFs recursive issue

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

This is a Deno.watchFs on Ubuntu 20.04 on WSL2 issue only, it works on Windows and Linux.
Closing the issue. Thx

from denon.

notfilippo avatar notfilippo commented on May 12, 2024

Thanks for this heads up! We will include a disclaimer on our installation docs.

from denon.

Bidek56 avatar Bidek56 commented on May 12, 2024

This is probably a WSL2 issue which MS may fix one day and it will start working, never know.

from denon.

Andersonfrfilho avatar Andersonfrfilho commented on May 12, 2024

I am facing the same problem on windows 10,
denon.json

{
  "$schema": "https://deno.land/x/denon/schema.json",
  "watch": true,
  "scripts": {
    "start": {
      "cmd": "deno run ./src/server.ts",
      "desc": "run my app.ts file",
      "allow": [
        "run",
        "net"
      ],
      "tsconfig": "tsconfig.json"
    }
  },
  "watcher": {
    "interval": 350,
    "exts": ["js", "jsx", "ts", "tsx", "json"],
    "match": ["*.*"],
    "skip": ["*/.git/*"],
    "legacy": false
  }
}

running debug
denon run -L debug --allow-read --allow-net server.ts > log.txt

�[34m[*]�[39m �[90m[�[3mmain�[23m]�[39m �[0mv2.3.3�[0m
�[34m[*]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mwatching path(s): *.*�[0m
�[34m[*]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mwatching extensions: js,jsx,ts,tsx,json�[0m
�[33m[!]�[39m �[90m[�[3m#0�[23m]�[39m �[0mstarting `deno run -L debug --allow-read --allow-net server.ts`�[0m
DEBUG JS - cwd D:\Projetos\Deno\backend-project
DEBUG JS - args []
�[31m[E]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mapp crashed - waiting for file changes before starting ...�[0m
�[34m[*]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mrestarting due to changes...�[0m
�[34m[*]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mwatching path(s): *.*�[0m
�[34m[*]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mwatching extensions: js,jsx,ts,tsx,json�[0m
�[33m[!]�[39m �[90m[�[3m#0�[23m]�[39m �[0mstarting `deno run -L debug --allow-read --allow-net server.ts`�[0m
DEBUG JS - cwd D:\Projetos\Deno\backend-project
DEBUG JS - args []
�[31m[E]�[39m �[90m[�[3mdaem�[23m]�[39m �[0mapp crashed - waiting for file changes before starting ...�[0m

structure project

https://cdn.discordapp.com/attachments/713793300527841411/753659750461472868/unknown.png

from denon.

 avatar commented on May 12, 2024

Solved: "match": ["**/*.*"] affects subfolders

The same issue on macOS 10.15.7

"match": ["*.*"] does not affects subfolder changes. No matter if legacy watcher property is true or false.

from denon.

eliassjogreen avatar eliassjogreen commented on May 12, 2024

That is because the glob you are using for match is wrong: **/*.* is for matching all files in any subfolder while *.* only matches root level files I believe

from denon.

 avatar commented on May 12, 2024

Confirmed. Thanks 🙏

"match": ["**/*.*"] affects subfolders 👍

from denon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.