Serverless plugin not found even though it's installed

Hi

So I’m trying to use serverless-aws-alias.

I ran “sls plugin install -n serverless-aws-alias” successfully
It appears in package.json.
it appears in npm list
And I can include it in node (“require(‘serverless-aws-alias’);”).

But when I try to deploy it, it says that the plugin cannot be found.

  Serverless Error ---------------------------------------
 
  ServerlessError: Serverless plugin "serverlesss-aws-alias" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.
      at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:137:17
      at Array.map (<anonymous>)
      at PluginManager.resolveServicePlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:123:8)
      at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:110:15)
      at /usr/local/lib/node_modules/serverless/lib/Serverless.js:78:35
  From previous event:
      at Serverless.init (/usr/local/lib/node_modules/serverless/lib/Serverless.js:76:8)
      at /usr/local/lib/node_modules/serverless/bin/serverless.js:71:8
      at processImmediate (internal/timers.js:439:21)
      at process.topLevelDomainCallback (domain.js:131:23)
  From previous event:
      at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless.js:61:4)
      at Module._compile (internal/modules/cjs/loader.js:936:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
      at Module.load (internal/modules/cjs/loader.js:790:32)
      at Function.Module._load (internal/modules/cjs/loader.js:703:12)
      at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
      at internal/main/run_main_module.js:17:11

How can I solve it?
Is there any other way to add aliases to my lambda functions?

Thanks

I am having the same issue but with a different plugin, is this solved?

Also my app is formed from multiple sub-apps all using the same node modules and connected to the same API Gateway on AWS, it works for all of the except a few, but there is no difference between them.

I checked the serverless.yml config it’s all ok.
The plugin is in in the node modules folder.
It was installed with yarn and has all it’s dependencies.

And as I mentioned the same package.json and the same node modules works for other apps

Unfortunately not.
I just didn’t use this plugin.

I ran “sls plugin install -n serverless-aws-alias” successfully
It appears in package.json.
it appears in npm list
And I can include it in node (“require(‘serverless-aws-alias’);”).

That all looks good, but the error mentions:

Make sure it’s installed and listed in the “plugins” section of your serverless config file.

Did you remember to include it in the plugins section of your serverless.yml?

example:

service: my-service
plugins:
  - serverless-aws-alias
provider:
  name: aws
  ...

Hope this helps.