Skip to content

WSL2: nodemon file watcher no longer working #4169

@adamlacombe

Description

@adamlacombe

Your Windows build number: 10.0.18917.1000

What you're doing and what's happening:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

I'm running [email protected]

My working directory is located in /mnt/c/Users/Adam/Documents/...

My nodemon.json:

{
  "watch": [
    "**/*.ts"
  ],
  "ext": "ts",
  "ignore": [
    "./test/*.ts",
    "./node_modules/**/node_modules"
  ],
  "exec": "node -r ts-node/register Index.ts",
  "env": {
    "NODE_ENV": "development"
  }
}

I run: nodemon --delay 1500ms --signal SIGTERM and then modify a file that is being watched.

I'm modifying the file from outside WSL, but I have also tried from within WSL using nano.

What's wrong / what should be happening instead: After updating to WSL2 nodemon no longer triggers a restart of my application.

I'm able to run nano ./modified_file.ts and see the change.

In another project built with [email protected] I'm able to run stencil build --dev --watch --serve and file modifications trigger a reload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions