Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Hi, does Serverless Offline not support Node.JS v14?
    Hey peep, any one having issues with serverless offline that it just hangs at invoke offline?
    @ats-org Is this with a POST request. Might be down to the version of node you are running as from what I can remember requests hang on v15 / v16 so might be worth downgrading using nvm?
    @ryanolee im using node12
    and it's on the initial start up not actually trying to invoke a function
    @ryanolee actually figured it out, the port pointing to the dynamodb was incorrect, there should probably be some check and error if it can't be found.
    Francesco Belvedere
    Hi all, does anybody here use Esbuild? Vscode debugging works fine with Webpack, but not with esbuild. I thought it would be an issue with sourcemaps, so I enabled them in the esbuild config, and can see they are correctly generated, however, this does not solve it. Any clue?
    Ahh that is fair enough @ats-org . A lot of the issues with hanging requests tend to be difficult to debug things like that 😓

    Hello Everyone. I am encountering this issue when im deploying my lambda function on the AWS. Previously this was working fine and need not make any changes. Here is there extract of the error [Container] 2020/11/24 11:56:06 Running command cd contra.serverless/

    [Container] 2020/11/24 11:56:06 Running command for d in *service; do (cd "$d" && echo $PWD && npm install && sls deploy --stage $ENV); done;

    ejs@2.7.4 postinstall /codebuild/output/src810336760/src/contra.serverless/contra.serverless/node_modules/ejs
    node ./postinstall.js

    Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

    spawn-sync@1.0.15 postinstall /codebuild/output/src810336760/src/contra.serverless/contra.serverless/node_modules/spawn-sync
    node postinstall

    serverless@1.45.1 postinstall /codebuild/output/src810336760/src/contra.serverless/contra.serverless/node_modules/serverless
    node ./scripts/postinstall.js

    (node:499) ExperimentalWarning: The fs.promises API is experimental
    npm WARN contra.serverless@1.0.0 No repository field.

    added 592 packages in 7.834s

    Type Error ---------------------------------------------

    TypeError: Cannot destructure property Resolver of 'undefined' or 'null'.
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/cacheable-lookup/source/index.js:10:5)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/got/dist/source/core/index.js:12:28)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/got/dist/source/as-promise/types.js:14:16)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/got/dist/source/as-promise/index.js:16:17)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/node_modules/got/dist/source/create.js:15:22)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load

    Lucas M Domingues
    alguém consegue me ajudar nessa pull request ? dherault/serverless-offline#1252

    Hi, I'm currently developing a nrwl nx plugin to support serverles-offline. I have got it all working however there seems to be an issue with serverless-offline's request clean up.

    I am starting a forked process of serverless offline using the bellow code.

     subProcess = fork(join(cwd(), `node_modules/serverless/bin/serverless.js`), args, {
            cwd: join(cwd(), dirname(options.config as string)), // path to serverless.yml folder 
            execArgv: getExecArgv(options) 

    after running a request or two to my REST lambda serverless-offline will output the following error several times.

    This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
    Error: connect EHOSTDOWN x.x.x.x:80 - Local (x.x.x.x:58555)
        at internalConnect (net.js:923:16)
        at defaultTriggerAsyncIdScope (internal/async_hooks.js:364:12)
        at net.js:1011:9
        at processTicksAndRejections (internal/process/task_queues.js:79:11)

    Does anyone know what could be causing this and how I might fix it.

    Hi! No updates on this dherault/serverless-offline#1213 ? It's a bit old now, but not merged yet
    Hi, is there any examples on how to create a docker image of serverless-offline for a java runtime?
    Hello! Is there any documentation on how to invoke a lambda that serverless-offline created? I'm trying to create a plugin that requires invoking lambdas depending on certain event criteria
    dherault/serverless-offline#823 => same issue. Anyone resolved it?
    Stack with id <stack-id> dev does not exist
    Hey guys :wave: Is there a way to start serverless offline server via code but not by forking a child process?
    Alessandro Tagliapietra
    Hi everyone, is there a way to have serverless-http + serverless-offline + multer to work? I'm getting corrupted files
    and it seems the issue is common:

    Hey folks. Just wondering if sls-offline supports sls v3 as it is now, or not.

    I'm getting hit with Detected unrecognized CLI options: "--httpPort", "--useWorkerThreads", "--noPrependStageInUrl". it seems.

    sls v3.1.0, sls-offline v8.4.0

    OK, I figured it out, I think. Seems to be happening due to the sls-cloudside-plugin which I combine with sls-offline (which doesn't list all the sls-offline cli options in its manifest)
    Christopher Thomas
    Hi, does anybody know how I can customise the aws endpoints in serverless offline so every aws call is done via a custom endpoint instead of to real AWS?
    The same thing as doing aws --endpoint=http://localhost:1234 s3 .... and this --endpoint option overrides what endpoint the aws cli would normally use with a custom url
    Jeremy Hall

    Anyone having any issues with M1 Pro's with Serverless-Offline?

    My project works perfectly with Serverless-Offline on my Intel Macbook. But as soon as I try on my M1 Pro, It starts but ignores any POST requests to the server.

    1 reply
    Howard Dean Watts
    Hey guys, my Serverless Offline implementation is returning an empty response at exactly 2 minutes when I call it from my browser. The function has a 15 minute timeout (and continues to execute after the connection is closed), and my javascript aws-sdk is calling invoke with an httpOption timeout to match the 15 minute timeout. I believe serverless offline is the culprit here, and am wondering where I can configure this timeout. I've tried AWS_CLIENT_TIMEOUT=900000 to no avail
    1 reply
    Dustin Goodman
    Screen Shot 2022-02-26 at 10.30.12 PM.png
    @dherault can you point me to where this is generated in the source? Trying to get it to play nice with nx run-commands and having some issues with the formatting. Want to submit a PR to either you or nx to get this resolved.
    And by "this", I mean the table. I was able to find the before and after but this bit is alluding me
    Most likely an issue with how nx is redirecting stdout as it's only an issue when using their tooling.
    Dustin Goodman
    Actually - you can ignore the above. I found the core issue. nrwl/nx#8269
    Walter Devia


    Is someone out there with a real-world example using Golang and serverless-offline? I would appreciate some good examples that could serve as a guide to start developing golang with serverles offline.


    Amit Gupta
    Hello Friends - I am using serverless-offline plugin for python development. It's working fine but I am not able to get hot reload working
    tried allowCache: false as well
    James Kyburz
    --useChildProcesses might be an option, a new process for every invoke, so latest code will always run
    TL;DR: serverless-offline works with --useDocker but doesn't otherwise
    I have serverlessapp folder which has sources 2 functions: hello and world (default template)


    {"errorMessage":"ENOENT: no such file or directory, open '/home/anderson/src/serverlessapp.go'","errorType":"Error","stackTrace":[]}

    Where does serverlessapp.go even come from? It's not a file, but actually a folder (serverlessapp) which contains hello and world functions.

    In the meantime, serverless invoke local --function hello does work. I'm using a default template from aws-go, just added the serverless-offline plugin
    Andrew Dunai
    I've changed the default value of handler: bin/hello (generated by aws-go template) to handler: hello/main.go and now this works locally but stopped working on AWS...
    Daniel McKnight

    Has anyone been able to get secure websockets working? My https endpoints work as expected, an insecure websocket works as expected, the logs say that Offline [websocket] listening on wss:// However, when I attempt to connect to the secure websocket I get the following error: Error: write EPROTO 140537828426520:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242

    My config looks like:

        port: 3100
        httpsProtocol: 'src/ssl'
        httpPort: 3100
        websocketPort: 3111
    Hello Everyone! Trying to setup a project with Serverless-offline very first time! Can anyone help in how to start the execution of the project! I am continuously facing the error: Unexpected error while starting serverless-offline server on port [PORT_DEFAULT_3000]: Error: listen EACCES: permission denied
    at Server.setupListenHandle [as _listen2] (node:net:1313:21)
    at listenInCluster (node:net:1378:12)
    at GetAddrInfoReqWrap.doListen (node:net:1516:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8) {
    code: 'EACCES',
    errno: -4092,
    syscall: 'listen',
    address: '',
    port: 3000
    } Any help will be appreciable! Thanks in advance!
    Marcos Iglesias
    Hi community, I came back here with another question/error I'm having. When running serverless-offline with my nx command "nx run app:serve" my console log info is breaking. It happens with a few services I have, but with other ones not. Can anybody help me? I will try to attach images for showing the error
    an example with good info showing
    example with broken info :(
    please, any suggestion or idea will be much appreciated! it's killing me lol
    tanvi patel
    Hi community, I am a beginner. How can we develop an admin panel in serverless using node js?
    Siddhant Vats


    Wondering if we can enable api caching using plugin serverless-api-gateway-caching and be able to test it with sls offline.

    Thanks in advance.