On Windows 10 I had nodejs 12 installed and Serverless Framework 1.61 and when I ran “sls offline” I got the error message “Runtime nodejs12.x is not supported”. I installed nodejs 10.15.2 but Serverless Framework is still giving me the error “Runtime nodejs12.x is not supported”
I uninstalled Serverless Framework and nodejs and re-installed both but stuck with this error. Any ideas on how to fix this
I use the serverless offline package with Node12 just fine. Make sure you have the updated version of that package, which currently is 5.12.1
https://www.npmjs.com/package/serverless-offline
Thanks for the info as it indirectly led me to get it working.
As I installed Serverless Framework for the first time yesterday I assume all the packages should be the latest. Anyway I ran “npm install serverless-offline --save-dev” and still got the same error.
Then I opened serverless.yml to edit it like it says in the link you provided and I noticed in that .yml file that there was a line “runtime: nodejs12.x”. Its a new project that was created after node12 was removed and nodejs10 installed so I don’t know where Serverless Framework is picking up that 12 version. Anyway, I changed that line to “runtime: nodejs10.x” and sls offline works now.
1 Like