It needs an update:
13 PRS and repos owners profile says hes on vacation till 2018.
Thanks @cmendes0101 :D
I've made a PR
https://github.com/dherault/serverless-offline/pull/382
I know this issue is closed, but if it does a runtime check and and fails to actually serve up the routes, should it throw an error instead of declaring a warning? I just ran into this same issue, and it wasn't obvious what the problem was since it was just a Warning and my understanding was that the plugin uses my local runtime regardless.
I would agree that it should throw an Error instead of Warning. I've made this mistake too because we work on so many projects and are always switchining node versions.
I am running into this right now โย as @clschnei mentioned I am node 8.10 locally (via nvm use 8.10) but I am getting the following error: Serverless: Warning: found unsupported runtime 'nodejs8.10'
Have upgraded Serverless and Serverless-Offline.
Will post back if I figure out whats going on but it would be great to know that it ISN'T a runtime issue to be able to put that portion of it to bed.
For what it's worth my serverless.yml runtime is set to:
provider:
name: aws
runtime: nodejs8.10
OK so I copied my node_modules directory over from a pre-existing project on the same stack and now it works. My guess it is some combination of the serverless version, serverless offline version and potentially serverless offline sqs versions.
Since I am on a paid client gig I can't go further into it than that โ but obviously this was not a Runtime issue in my case as well, and the Warning text cost me time when trouble shooting.
Thanks guys!
Sorry to hijack this thread, but I'm getting a similar error in a go lang project, scaffolded with:
serverless create --template aws-go-dep
I'm running this command:
serverless offline
and getting this output:
offline: Starting Offline: dev/us-east-1.
offline: Offline [http for lambda] listening on http://localhost:3002
offline: [GET] http://localhost:3000/hello
offline: [GET] http://localhost:3000/world
offline:
offline: [HTTP] server ready: http://localhost:3000 ๐
offline:
offline: OpenAPI/Swagger documentation:
offline: [GET] http://localhost:3000/documentation
offline:
offline: Enter "rp" to replay the last request
offline:
I get this fine output when the lambda function loads up:
offline: Starting Offline: dev/us-east-1.
offline: Offline [http for lambda] listening on http://localhost:3002
offline: [GET] http://localhost:3000/hello
offline: [GET] http://localhost:3000/world
offline:
offline: [HTTP] server ready: http://localhost:3000 ๐
offline:
offline: OpenAPI/Swagger documentation:
offline: [GET] http://localhost:3000/documentation
offline:
offline: Enter "rp" to replay the last request
offline:
But then when I try to hit the endpoint it crashes with this error:
offline: GET /hello (ฮป: hello)
offline: Warning: found unsupported runtime 'go1.x' for function 'hello'
offline: Failure: Unsupported runtime
Error: Unsupported runtime
at HandlerRunner._loadRunner (/Users/jim/node_modules/serverless-offline/src/lambda/handler-runner/HandlerRunner.ts:76:11)
at HandlerRunner.run (/Users/jim/node_modules/serverless-offline/src/lambda/handler-runner/HandlerRunner.ts:109:33)
at LambdaFunction.runHandler (/Users/jim/node_modules/serverless-offline/src/lambda/LambdaFunction.ts:210:46)
at hapiHandler (/Users/jim/node_modules/serverless-offline/src/events/http/HttpServer.ts:813:45)
at module.exports.internals.Manager.execute (/Users/jim/node_modules/@hapi/hapi/lib/toolkit.js:41:33)
at Object.internals.handler (/Users/jim/node_modules/@hapi/hapi/lib/handler.js:46:48)
at exports.execute (/Users/jim/node_modules/@hapi/hapi/lib/handler.js:31:36)
at Request._lifecycle (/Users/jim/node_modules/@hapi/hapi/lib/request.js:312:68)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
Hi @JimLynchCodes,
do you able to solve the problem given above?
Hi @JimLynchCodes
Did you found any solution for the above one?
This might be an old thread but I ended up here after getting the error described by @JimLynchCodes.
For future references, Go runtime is supported only via docker-runner which is toggled with --useDocker flag like:
โฏ sls offline --useDocker
Serverless: Stage is set to "dev"
Serverless: Region is set to "us-east-1"
offline: Starting Offline: dev/us-east-1.
offline: Offline [http for lambda] listening on http://localhost:3002
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ GET | http://localhost:3000/dev/hello โ
โ POST | http://localhost:3000/2015-03-31/functions/hello/invocations โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
offline: [HTTP] server ready: http://localhost:3000 ๐
offline:
offline: Enter "rp" to replay the last request
offline: GET /dev/hello (ฮป: hello)
Lambda API listening on port 9001...
START RequestId: 74e251a2-974d-1c84-51bf-664e6f72a147 Version: $LATEST
Most helpful comment
Sorry to hijack this thread, but I'm getting a similar error in a go lang project, scaffolded with:
I'm running this command:
and getting this output:
I get this fine output when the lambda function loads up:
But then when I try to hit the endpoint it crashes with this error: