Closed vijaybabu4589 closed 1 year ago
use angular-builders/custom-webpack
to exclude vm2
from webpack bundling
This is causing some major issues with our deployments and pipelines. We upped to 5.0.0 to avoid the npm high sec vulnerability BUT now we can't compile our lambdas. Any idea if this situation might be getting resolved soon please? Or tangible workarounds. We have tried a number of different options and libraries and approaches but so far no dice. Thanks.
+1 to this, we are seeing SyntaxError: Unexpected string
on Lambda when upgrading to 5.0.0
Does @vijaybabu4589's workaround work for you?
We are not using angular-devkit/build-angular
but if I use webpack externals to exclude vm2
I get Error: Cannot find module 'vm2'
so I am not sure what angular-builders/custom-webpack
is doing to exclude it successfully
@antpingelli try this https://github.com/patriksimek/vm2/issues/70#issuecomment-340221293
@antpingelli try this patriksimek/vm2#70 (comment)
This works but feels like a temporary fix rather than a long term solution. We can no longer use the zip plugin from webpack which makes deploying our 10 lambdas more involved. I do not think this is acceptable so we will be looking for other ways around this
@TooTallNate is this not something that can be fixed from your end?
@TooTallNate is this not something that can be fixed from your end?
Not really. It's an issue with the vm2
module. proxy-agent
is just a consumer of this module.
As a side-effect this leads to
ENOENT: no such file or directory, open '/var/task/contextify.js'
after deploying this to AWS Lambda with serverless
.
This code in this repository has been moved to the proxy-agents
monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.
i am using
angular-devkit/build-angular
(which uses webpack) to build nodejs server, After updating to npm packagenode-proxy-agent v5.0.0
dist file failed to start.i think its because of PR,
vm2
has a compatibility issues with webpack https://github.com/patriksimek/vm2/issues/70is there any work around ?