Is there any way I can set the NodeJs environment to NodeJs 8 when deploying to Google Cloud Functions with “serverless deploy”?
Here is what I’ve tried
But none of these work.
I am also looking for solution how to do it from sls cli.
This is not yet supported. There is a PR that potentially enable this, but its not merged yet:
Any update about the support for Nodejs 8 inside the file serverless.yml?
I tried runtime: nodejs8 but it didn’t work yet.
I think this was fixed about 1-2 months ago.
It works like this: runtime: nodejs8
Also, I had to add region like this: region: us-central1
Make sure you update serverless-google-cloudfunctions npm package to at least 2.0.0