serverless / serverless/serverless

serverless error: node.js 10.x is not supported when running sls create function

Open
#7,051 1 comment 0 reactions 1 assignee View on GitHub

@LouiseYau is already working on this.

Since Dec 5, 2019.

cat/plugin invalid
Dominant language
JavaScript
Stars
46.9k
Forks
5.7k
Avg merge
10h 7m
Merged PRs (30d)
57

Description

Bug Report

Description

  1. What did you do?
    Ran command serverless create function -f testFunction --handler testFunction.index

also tried:
sls create function -f myFunction --handler functions/myFunction/index.handler

  1. What happened?
    Received the following error for both:
    Serverless Error ---------------------------------------

Provider / Runtime "aws-nodejs10.x" is not supported. Supported runtimes are: "aws-nodejs4.3", "aws-nodejs6.10", "aws-nodejs8.10".

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: linux
Node Version: 10.16.0
Framework Version: 1.59.0
Plugin Version: 3.2.5
SDK Version: 2.2.1
Components Core Version: 1.1.2
Components CLI Version: 1.4.0

  1. What should've happened?

created the function template in new file and also created mocha test template in test folder
4. What's the content of your serverless.yml file?

  1. What's the output you get when you use the SLS_DEBUG=* environment variable (e.g. SLS_DEBUG=* serverless deploy)

Serverless Error ---------------------------------------

ServerlessError: Provider / Runtime "aws-nodejs10.x" is not supported. Supported runtimes are: "aws-nodejs4.3", "aws-nodejs6.10", "aws-nodejs8.10".
at serverless.yamlParser.parse.then (/home/DEPCON/lyau/doc-api-recordmanagement/node_modules/serverless-mocha-plugin/index.js:463:17)
at process._tickCallback (internal/process/next_tick.js:68:7)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:489:22)
at getHooks.reduce.then (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:524:24)
From previous event:
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:524:8)
at variables.populateService.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:115:33)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:102:74)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless.js:72:30)
at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /home/DEPCON/lyau/doc-api-recordmanagement/node_modules/serverless-plugin-warmup/node_modules/graceful-fs/graceful-fs.js:57:14
at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
at initializeErrorReporter.then (/usr/local/lib/node_modules/serverless/bin/serverless.js:72:8)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at Object. (/usr/local/lib/node_modules/serverless/bin/serverless.js:61:4)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: linux
Node Version: 10.16.0
Framework Version: 1.59.0
Plugin Version: 3.2.5
SDK Version: 2.2.1
Components Core Version: 1.1.2
Components CLI Version: 1.4.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.