Docker-compose volumes not syncing with local files, works when I remove the volume for the local file

yesterday I updated Docker to version Docker version 19.03.5, build 633a0ea on Windows 10 Pro.
All the projects were running correctly and no additional configuration has been made.

.dockerignore

node_modules
npm-debug.log
.gitignore
.env

docker-compose.yml

version: '3.7'
services:
  backend:
    build:
      context: .
    volumes:
      - .:/usr/src/app
      - node_modules:/usr/src/app/node_modules
      - .git:/usr/src/app/.git
    ports:
      - '5000:5000'
      - '9229:9229'
    links:
      - mongo
    environment:
      - CHOKIDAR_USEPOLLING=true
  mongo:
    image: mongo
    ports:
      - '27017:27017'

volumes:
  node_modules:

Dockerfile

FROM node:10
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 5000
CMD npm run server

After I execute docker-compose up --build I get the following error:

backend_1  | > nodemon server.js
backend_1  |
backend_1  | sh: 1: nodemon: not found
backend_1  | npm ERR! code ELIFECYCLE
backend_1  | npm ERR! syscall spawn
backend_1  | npm ERR! file sh
backend_1  | npm ERR! errno ENOENT
backend_1  | npm ERR! [email protected] server: `nodemon server.js`
backend_1  | npm ERR! spawn ENOENT
backend_1  | npm ERR!
backend_1  | npm ERR! Failed at the [email protected] server script.
backend_1  | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
backend_1  |
backend_1  | npm ERR! A complete log of this run can be found in:
backend_1  | npm ERR!     /root/.npm/_logs/2020-01-23T04_11_11_071Z-debug.log

My folder structure is the following:

root
  | client
    | .dockerignore
    | docker-compose.yml
    | Dockerfile
    | package-lock.json
    | package.json
  ...
  | .dockerignore
  | docker-compose.yml
  | Dockerfile
  | package-lock.json
  | package.json
  | server.js

As you can see, I also have another project inside and it’s running how it should.

Source: StackOverflow