Skip to content
This repository was archived by the owner on Jun 15, 2024. It is now read-only.

node_modules not included in layersΒ #163

@naveen-murali

Description

@naveen-murali

Issue Description:
After upgrading to version v2.8.5 of serverless-layers, the plugin fails to include the node_modules directory in its generated layers.

Steps to Reproduce:

  1. Upgrade serverless-layers to v2.8.5.
  2. Deploy a serverless application that utilizes layers.
  3. Verify the contents of the deployed layers.

Expected Behavior:
The layers should contain the node_modules directory, including all dependencies required by the specified packages.

Actual Behavior:
Upon inspection of the deployed layers, we can see that the node_modules directory is missing.

Workaround:
Reverting to version v2.7.0 of serverless-layers resolves the issue, as the node_modules directory is correctly included in the generated layers.

Environment:

  • Serverless Framework version: 3.38.0
  • Node.js version: 18.17.1
  • NPM Version: 9.6.7

Screenshot:
example
Here you can observe that the total layer size is much less than it should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions