-
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
Calling a sls webpack serve
endpoint throws "TypeError: func is not a function"
#46
Comments
same issue with me! |
|
Try setting output definition in webpack.config.js: |
@PerryBirch changes nothing |
the |
I get this error only before the .webpack folder has been created - the console looks like it's ready and serving routes even though the webpack build is still happening in the background. |
Is there any more news on this or steps to get around it? |
In my case the problem was that starting my function failed. And then I got this error. Try to add this to beggining of your handler (it will report errors): process.on('uncaughtException', function (err) { |
I was able to reproduce it last time but it seams fixed for me in the latest rc.3 Are you still expecting this issue? |
I got this error in version rc.4 |
As of my PR (#58) using serverless-offline (https://github.com/dherault/serverless-offline) together with serverless-webpack should be the way to go for local testing |
|
func
represents the handler function defined inserverless.yml
.It seems this block initially sets
handlerFunc
(later referred to asfunc
) tonull
. Setting it tofuncConf.handler.split('.')[0]
fixes the issue.However, it looks like we have webpack setting the
handlerFunc
later on. I'm not sure whatloadHandler
does, or why it's important.I searched the webpack docs and source but couldn't find reference to a
loadHandler
.The text was updated successfully, but these errors were encountered: