Skip to content
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 · Fixed by #252
Closed

3.1.1 dropping some dependencies. #251

colinfindlay-nz opened this issue Oct 10, 2017 · 10 comments · Fixed by #252
Labels
Milestone

Comments

@colinfindlay-nz
Copy link

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
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
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
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
Copy link
Author

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

@HyperBrain
Copy link
Member

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

@HyperBrain
Copy link
Member

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

@HyperBrain
Copy link
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

@HyperBrain
Copy link
Member

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
Copy link
Author

Can confirm it's now working as expected

@HyperBrain
Copy link
Member

Released with 3.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants