lib/classes/PluginManager.js/PluginManager/loadPlugins
class PluginManager:  loadPlugins(plugins) {
    plugins.forEach((plugin) => {
      try {
        const Plugin = require(plugin); // eslint-disable-line global-require

        this.addPlugin(Plugin);
      } catch (error) {
        if (this.cliCommands[0] === 'plugin') {
          return;
        }
        let errorMessage;
        if (error && error.code === 'MODULE_NOT_FOUND' && error.message.endsWith(`'${plugin}'`)) {
          // Plugin not installed
          errorMessage = [
            `Serverless plugin "${plugin}" not found.`,
            ' Make sure it\'s installed and listed in the "plugins" section',
            ' of your serverless config file.',
          ].join('');
        } else {
          // Plugin initialization error
          // Rethrow the original error in case we're in debug mode.
          if (process.env.SLS_DEBUG) {
            throw error;
          }
          errorMessage =
            `Serverless plugin "${plugin}" initialization errored: ${error.message}`;
        }
        if (!this.cliOptions.help) {
          throw new this.serverless.classes.Error(errorMessage);
        }

        this.serverless.cli.log(`WARNING: ${errorMessage}\n`);
      }
    });
  }