invalid type

docker-compose invalid type in volume

I am getting a following error when I run docker-compose up: *volumes contains an invalid type, it should be a string* my docker-compose file: data-emitter: build: context: DataEmitter dockerfile: ./Dockerfile volumes: - type: bind source: ./DataEmitter/data/logs.txt target: /data/logs.txt read_only: true Since there is a type: bind, what is the problem here?
Subscribe to invalid type