Field not found, node: stripPrefix

I'm trying to do a basic rewrite logic with the following dynamic configuration

http:
  routers:
    my-router:
      rule: "Host(`localhost`) && PathPrefix(`/console/subpath/`)"
      service: my-service
      middlewares:
        - my-stripprefix

  services:
    my-service:
      loadBalancer:
        servers:
          - url: "http://localhost:9090"

  middlewares:
    my-stripprefix:
      stripPrefix:
        prefixes:
          - "/console/subpath"

but when trying to start traefik in the following fashion

traefik --providers.file.filename=/traefik-dynamic.yml

I get the error

2023/05/17 11:17:47 command traefik error: field not found, node: stripPrefix

I see this feature is clearly documented here so I don't understand why this problem is happening

Hello,

If I run your [dynamic configuration](Traefik Configuration Documentation | Traefik | v2.10 file with your command there is no error.

This error message is related to something defined in the static configuration (not the dynamic configuration), so I guess you have a traefik.yml file with the something called stripPrefix in it.