Setting includeModules prevents serverless deploy from running (exits after webpack and before package)

Hi!

I’m trying to get sharp installed and deployed in a function. It bundles correctly and runs perfectly with serverless offline but when I run serverless deploy, the process exits (no errors) right after webpack finishes bundling (I have a .webpack that looks correct) but it never moves onto the next step (serverless packaging).

Excerpt from end of log
SLS_DEBUG=\* serverless deploy --verbose

Serverless: Invoke webpack:package
Serverless: Fetch dependency graph from /Users/cathy/relephant/web/package.json
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: sharp@^0.25.2
Serverless: Package took [4117 ms]
// EXITS HERE - no error messages

Excerpt from serverless.yml

plugins:
  - serverless-webpack
  - serverless-offline

custom:
  webpack:
    includeModules: true
    packager: 'yarn'

Additional webpack details

externals: { sharp: "commonjs sharp" }, is in the webpack config. (Using nodeExternals results in the same error)


Any leads would be very appreciated :slight_smile: Have been stuck on this for quite a while.

2 Likes

Including versions in case that is helpful information:

“serverless-offline”: “^5.12.1” - using an older version because of this ongoing issue
“serverless-webpack”: “^5.3.1”

serverless:
Framework Core: 1.67.2
Plugin: 3.6.6
SDK: 2.3.0
Components: 2.29.0

Me and my team are dealing with the same issue. Would love to see it resolved!

1 Like

Timeline for a fix? This is a significant blocker for us

1 Like

Glad someone reported this! Getting the same issue and it’s a major hold up for me.

1 Like

literally just ran into this too. i’m on the latest of everything tho

1 Like