-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bundling of node modules works oddly #117
Comments
Oh interesting is that deployment in Docker worked earlier but the container was based on |
I have found a missing requirement (which was in |
We discovered an issue with the update to Serverless 1.16 today (in combination with the plugin), that the packaged dependencies were screwed up completely - lots of missing node modules that lead to module required exceptions when deployed to AWS. Switching back to 1.15.x bundles the correct dependencies again. Maybe it is related to serverless/serverless#3737. Can anyone confirm these problems with Serverless 1.16? If yes, I will open a separate bug there after a deeper analysis what exactly happens. Just another issue with 1.16 module packagin appeared: serverless/serverless#3869 |
I implemented the support of the service wide |
@HyperBrain Would love to test it! Could you publish the branch with an npm dist-tag so I can use it without referencing a specific git commit? |
@keplersj Will do later today. Hmmm... the individual packaging is still in a PR, i.e. it is not yet merged into the v3.0.0 branch. I'd rather like to do a prerelease of the v3.0.0 branch as soon as the feature is merged. |
@HyperBrain No worries! I just read up the npm documentation and didn't realize I could reference the branch over the commit hash. Will test it real soon. |
I use
webpack-node-externals
for bundling mode modules like this:(whole config is here: https://github.com/keboola/developer-portal/blob/master/webpack.config.js)
And it worked quite well until recently when I decided to move the deployment to Docker and noticed that the code stopped working because some modules are missing. I have found out that the
nodeExternals()
method returns list of 47 modules however when I runserverless deploy
, it bundles 137 modules. Although quite more then I want but the code still works. But the weird thing is that when I run the same deployment from a docker container (using this Dockerfile: https://github.com/keboola/developer-portal/blob/docker-travis/Dockerfile) it bundles only 18 modules, so the code fails on missing modules. Would you have any idea why is this going on? Thanks.The text was updated successfully, but these errors were encountered: