Skip to content

Dev Dependencies in a service which are also core dependencies of a package are removed #14

@duro

Description

@duro

It would appear that when using serverless-plugin-monorepo if your service package.json has a devDependency which also happens to be a non-dev dependency of another module, and the versions are the same (so they both rely on the module installed at the top of node_modules), what will happen is that the devDependency gets removed.

I have put together a reproduction case for this issue here:

https://github.com/duro/sls-devdep-repro

This caused us a big issue when deploying today, and we were forced to move the devDependency to dependencies in order to prevent it from getting stripped.

It would seem that Serverless Framework itself is doing something else under the hood, as it does not strip this dependency during it's own remove of devDependencies step (when serverless-plugin-monorepo is not used)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions