serverless-webpack: Launching serverless-offline fails with serverless-webpack@2.2.0

This is a Bug Report

Description

Using config based on the example, after upgrading to serverless-webpack@2.2.0, serverless-offline fails to start with the following error:

Serverless Error ---------------------------------------

  No matching handler found for 'handler'. Check your service definition.

The same config works fine with serverless-webpack@2.1.0.

Minimal(ish) repro: https://github.com/haines/serverless-webpack-issue

Additional Data

  • Serverless-Webpack Version you’re using: 2.2.0
  • Webpack version you’re using: 3.4.1
  • Serverless Framework Version you’re using: 1.18.0
  • Operating System: Mac OS X 10.12.5
  • Stack Trace (if available): N/A

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

I fixed the example. The handler definition must include the path so that the Serverless framework and the plugin knows the location of the handler.

functions:
  first:
    handler: src/handler.hello