sequenced plugin not found

Attempting to add a custom plugin to edge microgateway by referencing this page: https://docs.apigee.com/api-platform/microgateway/2.5.x/develop-custom-plugins#aboutpluginhandlerexe...

However, when I start edgemicro I get:

using pluginDir

using plugin dir /node-v10.15.3-linux-x64/lib/node_modules/edgemicro/plugins/

sequenced plugin not found: plugin-1


Even though I have it defined in my configuration as so:

  plugins:
    dir: /node-v10.15.3-linux-x64/lib/node_modules/edgemicro/plugins
    sequence:
      - oauth
      - plugin-1

I read here you could add the absolute path in your edgemicro start command: https://community.apigee.com/questions/61022/sequenced-plugin-not-found-plugin-name.html

So I did that like so:

edgemicro start -c /var/cse/.edgemicro -o "$EDGEMICRO_ORG" -e "$EDGEMICRO_ENV" -k "$EDGEMICRO_KEY" -s "$EDGEMICRO_SECRET" -d /node-v10.15.3-linux-x64/lib/node_modules/edgemicro/plugins

However I'm still gettting the error/warning, am I doing something wrong here?

0 2 1,219
2 REPLIES 2

Realized my path was not the right path to the plugins, updated path but sitll getting error/warning:

  plugins:
    dir: /node-v10.15.3-linux-x64/lib/node_modules/edgemicro/node_modules/microgateway-plugins
    sequence:
      - oauth
      - plugin-1

And I can verify those plugins are there:

[root@1cd683ab9a32 microgateway-plugins]# pwd
/node-v10.15.3-linux-x64/lib/node_modules/edgemicro/node_modules/microgateway-plugins
[root@1cd683ab9a32 microgateway-plugins]# ll | grep plugin
drwxr-xr-x.   2 root root  4096 Jun 23 19:08 plugin-1
drwxr-xr-x.   2 root root  4096 Jun 23 19:08 plugin-2
drwxr-xr-x.   2 root root  4096 Jun 23 19:08 plugin-3

Ok figured it out. Had to add the the plugins I was going to use in the index.js in the microgateway-plugins folder like so:

  'plugin-1': require('./plugin-1'),
  'plugin-2': require('./plugin-2'),
  'plugin-3': require('./plugin-3'),

This was not in the Documentation however, needs to be documented