# Command traefik error: field not found, node: devPlugin

**URL:** <https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792>\
**Category:** Traefik v2\
**Tags:** plugin\
**Created:** [March 17, 2022, 3:42am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792 "2022-03-17T03:42:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![panah](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/panah/32/5076_2.png) [@panah](https://community.traefik.io/u/panah)\
**Post date:** [March 17, 2022, 3:42am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792/1 "2022-03-17T03:42:40Z")

</div>

I'm learning how to create Traefik plugin [by following this tutorial](https://www.youtube.com/watch?v=hCYT1aKJORY). I follow it exactly the same way without barely deviations. But, I encountered a problem when I try to run the plugin at 26:08.

```yaml
# plugins/traefik-uiddemo.yaml
pilot:
    token: "token"

api:
  dashboard: true
  insecure: true

experimental:
  devPlugin:
    goPath: /home/user/go
    moduleName: github.com/<user>/uiddemo

entryPoints:
  http:
    address: ":8000"
    forwardedHeaders:
      insecure: true

providers:
  file: 
    filename: rules-uiddemo.yaml

```

```yaml
# plugins/rules-uiddemo.yaml
http:
  # Add router
  routers:
    my-router:
      entryPoints:
      - http
      middlewares:
      - pluginDemo
      service: service-whoami
      rule: Path(`/whoami`)

  # Add services
  services:
    service-whoami:
      loadBalancer:
        servers:
        - url: http://localhost:5000/
        passHostHeader: false
  
  middlewares:
    plugindemo:
      plugin:
        dev:
          Foo: Bar

```

```go
# plugins/src/github.com/<user>/uiddemo
package uiddemo

import (
	"context"
	"net/http"
)

// Config holds configuration passed to the plugin
type Config struct{}

// CreateConfig populates the Config struct
func CreateConfig() *Config {
	return &Config{}
}

// UIDDemo holds the necessary components of a Traefik plugin
type UIDDemo struct {
	next http.Handler
	name string
}

// New instantiates and returns the required components used to handle a HTTP request
func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error) {
	return &UIDDemo{
		next: next,
		name: name,
	}, nil
}

func (u *UIDDemo) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
	rw.Write([]byte("Hello world "))
}

```

When I try to run and test the plugin by running this command

```bash
$ ./traefik --configfile traefik-uiddemo.yaml

```

I encountered this error

```bash
2022/03/17 10:34:21 command traefik error: field not found, node: devPlugin

```

What happened? I know the problem lies on `devPlugin` in traefik-uiddemo.yaml, but I just can't figure out why and how to solve it.

As far as I'm aware, `goPath` refers to my Go Path on my computer and `moduleName` refers to the module name of the plugin I use. I'm missing something.

---

<div class="post-metadata">

**Author:** ![tommoulard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/tommoulard/32/2997_2.png) [@tommoulard](https://community.traefik.io/u/tommoulard)\
**Post date:** [March 17, 2022, 8:45am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792/2 "2022-03-17T08:45:32Z")

</div>

Hello @panah,

Since Traefik v2.5 ([Local private plugins. by ldez · Pull Request #8224 · traefik/traefik · GitHub](https://github.com/traefik/traefik/pull/8224)), `devPlugin` was replaced by `localPlugins`.

Hope it helps 🙂

---

<div class="post-metadata">

**Author:** ![panah](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/panah/32/5076_2.png) [@panah](https://community.traefik.io/u/panah)\
**Post date:** [March 17, 2022, 11:01am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792/3 "2022-03-17T11:01:30Z")

</div>

Thanks! So that's why some articles I read use `localPlugins`.

Anyway, do you have any plan to update the documentation? Some docs like [this](https://doc.traefik.io/traefik-pilot/plugins/plugin-dev/) still use `devPlugin` and it doesn't tell us about the depreciation.

---

<div class="post-metadata">

**Author:** ![tommoulard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/tommoulard/32/2997_2.png) [@tommoulard](https://community.traefik.io/u/tommoulard)\
**Post date:** [March 17, 2022, 11:21am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792/4 "2022-03-17T11:21:45Z")

</div>

> [@panah](#):
>
> Some docs like [this](https://doc.traefik.io/traefik-pilot/plugins/plugin-dev/) still use `devPlugin` and it doesn't tell us about the depreciation.

Indeed, something has to be done about that 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [March 20, 2022, 11:22am UTC](https://community.traefik.io/t/command-traefik-error-field-not-found-node-devplugin/13792/5 "2022-03-20T11:22:39Z")

</div>

Closed on March 20, 2022, 11:22am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
