New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.1 dropping some dependencies. #251

Closed
colinfindlay-nz opened this Issue Oct 10, 2017 · 10 comments

Comments

Projects
None yet
2 participants
@colinfindlay-nz
Copy link

colinfindlay-nz commented Oct 10, 2017

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/
@colinfindlay-nz

This comment has been minimized.

Copy link
Author

colinfindlay-nz commented Oct 10, 2017

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

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 10, 2017

@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).

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 10, 2017

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.

@colinfindlay-nz

This comment has been minimized.

Copy link
Author

colinfindlay-nz commented Oct 10, 2017

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

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 10, 2017

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

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 10, 2017

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

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 10, 2017

@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

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 11, 2017

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

@HyperBrain HyperBrain added this to the 3.1.2 milestone Oct 11, 2017

@colinfindlay-nz

This comment has been minimized.

Copy link
Author

colinfindlay-nz commented Oct 11, 2017

Can confirm it's now working as expected

@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 11, 2017

Released with 3.1.2

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