Is the Pugins namespace protected?

Hello

I am currently using the serverless functions to render api end point for https://api.lando.dev (lando-api.netlify.app)

My current toml file redirects the base name of all js files in the functions directory to their respective url via:

[build]
  functions = "functions"

# API rewrites
[[redirects]]
  from = "/"
  to = "/v1"
  status = 200
[[redirects]]
  from = "/v1/*"
  to = "/.netlify/functions/:splat"
  status = 200

So a file names functions/ping.js will redirect to https://api.lando.dev/v1/ping.

The issue at hand is if I name a file plugins.js, I get this error when using the netlify-cli:

 ›   TypeError: `` is not an Option Object

The error stems from:

TypeError: `` is not an Option Object
    at Object.module.exports (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/merge-options/index.js:164:10)
    at getConfigForFunction (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/config.js:30:36)
    at /home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js:72:65
    at Array.map (<anonymous>)
    at getFunctionsFromPaths (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js:70:43)
    at async FunctionsRegistry.listFunctions (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/main.js:25:26)
    at async FunctionsRegistry.scan (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/src/lib/functions/registry.js:175:23)
TypeError: `` is not an Option Object
    at Object.module.exports (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/merge-options/index.js:164:10)
    at getConfigForFunction (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/config.js:30:36)
    at /home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js:72:65
    at Array.map (<anonymous>)
    at getFunctionsFromPaths (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js:70:43)
    at async FunctionsRegistry.listFunctions (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/@netlify/zip-it-and-ship-it/dist/main.js:25:26)
    at async FunctionsRegistry.scan (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/src/lib/functions/registry.js:175:23)

/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:116
      throw ex;
      ^
abort({}) at Error
    at jsStackTrace (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1070:13)
    at stackTrace (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:1087:12)
    at process.abort (/home/john/.nvm/versions/node/v16.15.0/lib/node_modules/netlify-cli/node_modules/netlify-redirector/lib/redirects.js:8502:44)
    at process.emit (node:events:527:28)
    at emit (node:internal/process/promises:140:20)
    at processPromiseRejections (node:internal/process/promises:274:27)
    at processTicksAndRejections (node:internal/process/task_queues:97:32)
(Use `node --trace-uncaught ...` to show where the exception was thrown)

If I rename the file to anything else, it works just fine, just not when I use the plugins namespace. So is the plugins namespace a protected /reserved namespace/path on netlify?

Hey @labboy0276,

I can reproduce this and it doesn’t appear to be a reserved name issue. We’ve not reserved any names for Functions. To me this sounds like a bug in the CLI. Could you file an issue here: Issues · netlify/cli · GitHub