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
provider:
runtime: nodejs8.10
or
provider:
runtime: nodejs8
or
provider:
runtime: nodejs8.11.1
But none of these work.
jakeki
July 30, 2018, 1:47pm
2
I am also looking for solution how to do it from sls cli.
KeKs0r
August 8, 2018, 8:37am
3
This is not yet supported. There is a PR that potentially enable this, but its not merged yet:
serverless:master
← PatrickHeneise:feat/nodejs8-runtime
opened 10:24AM - 31 Jul 18 UTC
Fix issues #113 and #112
BREAKING CHANGE:
- defaults to `nodejs8` runtime
…
```
provider:
name: google
runtime: nodejs8
project: myapp
region: europe-west1
memorySize: 128
```
Results in:
<img width="771" alt="screenshot 2018-07-31 at 13 19 41" src="https://user-images.githubusercontent.com/74390/43454071-89f07766-94c4-11e8-88ed-0ef0ca60465f.png">
1 Like
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
2 Likes