Skip to content

Dev dep exclusion should log on package.json errors #4358

Open

Description

@arichiardi

This is a Bug Report

Description

When there is a syntax error in your package.json, your devDependencies won't be excluded.
This is more baffling than anything, I would have expected an error printed out (so that at least I'd know it is my fault 😄).

The problem, which is probably an expectation problem, can be solved by adding a log statement here so that we know that some error happened, maybe filtering it and showing only errors coming from your own package.json.

Similar or dependent issues:

Additional Data

  • Serverless version: 1.23.0

Activity

  1. changed the title [-]Dev dependency exclusion should log on errors[/-] [+]Dev dep exclusion should log on package.json errors[/+] on Oct 6, 2017
  2. horike37 commented on Oct 9, 2017

    @horike37
    Contributor

    Thank you for reporting @arichiardi 👍
    I could reproduce the bug on my end.
    It had better stop the process and an error printed out in the case.

    Step to reproduce

    • Run serverless create -t aws-nodejs and create a new project
    • Run npm init inside the service
    • Run npm install --save-dev aws-sdk inside the service
    • Modify package.json so that a syntax error occurs
    • Run serverless package
    • Check the generated artifact, you will see aws-sdk in node_modules without excluding
  3. self-assigned this
    on Oct 9, 2017
  4. medikoo commented on Jan 19, 2021

    @medikoo
    Contributor

    We will take into account with #8586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions