-
Notifications
You must be signed in to change notification settings - Fork 3
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
Module initialization error on using with AWS lambda #3
Comments
If you're using a code bundler such as webpack then you'll need to ensure native modules such as this are part of its externals config. https://webpack.js.org/configuration/externals/ |
Hi @lovell , Thank you a lot for your quick reply, I am using Webpack indeed, and https://github.com/liady/webpack-node-externals for externals. I tried to whitelist 'shorter' with :
But I am getting these error :
I am missing something... If you have any idea, Thank you |
According to the docs for the |
Right I misunderstood your reply, I thought I needed to include it So I was getting the error of my first post with using |
Is the |
Hey guys, thanks posting this issue. I am facing the same issue with my serverless when I deploy sharp to my lambda function. I am started and I cannot be able to exe sharp.node and pre-compiled files in serverless with webpack nor in AWS lamda. Any throughs how I can outcome this issue, I'm running in Mac? |
@sharstream This is the |
Sorry the delay response @lovell. I took a harder look to those issues: #1258, #1306, serverless-webpack#396. I'm using webpack same as #396 but with node8.10. My machine's running on darwin-x64 and every deployments is through a gitlab ci-pipeline in linux-x64. I'm using the same webpack.config.js and the problem still persist, I tried different approaches, I think my last resource is run a docker image before bundling with webpack. Is there any further steps I can follow? TIA Below is my errors prompted:
|
@sharstream This is not the sharp repo. |
@sharstream This is the |
Hi there,
I tried to use your package on a serverless function (AWS Lambda nodeJs 8.10), but I am getting this error :
I found this issue lovell/sharp#1306 for Sharp, so I tried to do it.
I am deploying my function throught circle-ci which is using these commands (among others) :
The last one produced this log :
Any suggestions ? :)
Thanking you in advance
The text was updated successfully, but these errors were encountered: