Visitar URL original
3.1.1 dropping some dependencies. · Issue #251 · serverless-heaven/serverless-webpack · GitHub
Skip to content

3.1.1 dropping some dependencies. #251

Closed

Description

@colinfindlay-nz

This is a Bug Report

Description

As of version 3.1.1 certain dependencies seem to be dropped from packaging. Currently seeing this with stateful.co - Not sure if because of full-stop, or something deeper in the package.json.

Generated package.json and resulting node-modules folder below (can produce a minimal example - but pressed for time atm):

less package.json
{
  "dependencies": {
    "babel-runtime": "^6.26.0",
    "aws-xray-lambda-promise-subsegment": "^1.1.0",
    "raven": "^2.1.2",
    "stateful.co": "^1.0.1"
  }
}
ls -1p node_modules
async/
async-listener/
aws-xray-lambda-promise-subsegment/
aws-xray-sdk/
aws-xray-sdk-core/
aws-xray-sdk-express/
aws-xray-sdk-mysql/
aws-xray-sdk-postgres/
babel-runtime/
colors/
continuation-local-storage/
cookie/
core-js/
cycle/
emitter-listener/
eyes/
isstream/
lsmod/
moment/
pkginfo/
raven/
regenerator-runtime/
semver/
shimmer/
stack-trace/
timed-out/
underscore/
winston/

Activity

  1. colinfindlay-nz commented on Oct 10, 2017

    @colinfindlay-nz
    Author

    Further info - the generated master package.json .webpack/dependencies/package.json contains:

        "stateful": {
          "co": "^1.0.1"
        }
    

    Can confirm full stops in package names break things - not sure why it wasn't happening in 3.1.0

  2. HyperBrain commented on Oct 10, 2017

    @HyperBrain
    Member

    @silver2k Just had a brain flash.... I think I know what it is - The npm ls command used to fetch the dependency tree cuts the stdout as soon as its buffer is full. The default buffer size is 200K, which might be not enough if you have lots of dependencies.

    There is a hidden setting for the plugin to increase the buffer size.
    Can you try to set custom: packExternalModulesMaxBuffer: 614400 (600 KB) and check if it works then? If necessary increase the size further (I do not know if there's a physical limit).

  3. HyperBrain commented on Oct 10, 2017

    @HyperBrain
    Member

    In case this solves your problem, we should increase the default buffer size.

    Regarding the package name parsing (full stops) I do not remember that there was any change, but I'll check it to be sure.

  4. colinfindlay-nz commented on Oct 10, 2017

    @colinfindlay-nz
    Author

    See comment above - it's definitely the fullstop in stateful.co being read as a nested dependency, rather than the full name.

  5. HyperBrain commented on Oct 10, 2017

    @HyperBrain
    Member

    @silver2k Thanks for the clarification. Flagged it as bug.

  6. HyperBrain commented on Oct 10, 2017

    @HyperBrain
    Member

    Found the issue in #246 (commented there). I'll provide a fixed release asap.

  7. HyperBrain commented on Oct 10, 2017

    @HyperBrain
    Member

    @silver2k Can you try with "serverless-webpack": "serverless-heaven/serverless-webpack#fix-modules-with-full-stop" if that fixes the problem? As soon as you report back, I'll prepare 3.1.2

  8. HyperBrain commented on Oct 11, 2017

    @HyperBrain
    Member

    I did a quick check with a test project that includes "stateful.co" and it worked for me with the fix.

  9. added this to the 3.1.2 milestone on Oct 11, 2017
  10. colinfindlay-nz commented on Oct 11, 2017

    @colinfindlay-nz
    Author

    Can confirm it's now working as expected

  11. HyperBrain commented on Oct 11, 2017

    @HyperBrain
    Member

    Released with 3.1.2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions