All Products
Search
Document Center

Function Compute:Node.js

Last Updated:Oct 23, 2025

Function Compute provides various Node.js runtimes.

Node.js runtimes

The following versions are supported.

Version

Identifier

Operating system

Architecture

Node.js 20.x

nodejs20

Linux (Debian 10)

x86_64

Node.js 18.x

nodejs18

Linux (Debian 10)

x86_64

Node.js 16.x

nodejs16

Linux (Debian 9)

x86_64

Node.js 14.x

nodejs14

Linux (Debian 9)

x86_64

Node.js 12.x

nodejs12

Linux (Debian 9)

x86_64

Important

Node.js 4.4, Node.js 6, Node.js 8.x, and Node.js 10.x runtimes have reached their end of life (EOL). For more information, see Runtime deprecation policy.

Designate a function handler as an ES module

For Node.js 18 and later, Function Compute supports both ECMAScript (ES) and CommonJS modules. For earlier versions, only CommonJS modules are supported. By default, Function Compute treats .js files as CommonJS modules.

You can designate your code as an ES module in two ways:

  • Specify type as module in your function's package.json file. In this case, all .js files will be treated as ES modules.

  • Use the .mjs file name extension. In this case, only the files you specify with .mjs are ES modules, while .js files remain CommonJS modules.

Commonly used modules

In addition to the standard modules of Node.js, Function Compute provides the following popular modules for Node.js that you can reference.

Node.js 20 and 18

Module

Description

Version

co

Control flow

4.6.0

gm

GraphicsMagick

1.25.0

ali-oss

OSS SDK

6.19.0

aliyun-sdk

Alibaba Cloud SDK

1.12.10

alicloud/fc2

FC SDK

2.6.6

tablestore

Tablestore SDK

5.4.1

body

HTTP body parsing library (body)

5.1.0

raw-body

HTTP body parsing library (raw body)

2.5.2

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud SDK of POP API

1.7.13

Node.js 16

Module

Description

Version

co

Control flow

4.6.0

gm

GraphicsMagick

1.23.1

ali-oss

OSS SDK

6.17.1

aliyun-sdk

Alibaba Cloud SDK

1.12.5

alicloud/fc2

FC SDK

2.6.0

tablestore

Tablestore SDK

5.2.1

body

HTTP body parsing library (body)

5.1.0

raw-body

HTTP body parsing library (raw body)

2.5.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud SDK of POP API

1.7.12

Node.js 14

Module

Description

Version

co

Control flow

4.6.0

gm

GraphicsMagick

1.23.0

ali-oss

OSS SDK

6.6.0

aliyun-sdk

Alibaba Cloud SDK

1.12.3

alicloud/fc2

FC SDK

2.2.0

tablestore

Tablestore SDK

5.0.7

body

HTTP body parsing library (body)

5.1.0

raw-body

HTTP body parsing library (raw body)

2.4.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud SDK of POP API

1.7.9

alicloud/fnf

Workflow SDK

1.1.0

Node.js 12

Module

Description

Version

co

Control flow

4.6.0

gm

GraphicsMagick

1.23.0

ali-oss

OSS SDK

6.6.0

aliyun-sdk

Alibaba Cloud SDK

1.12.3

alicloud/fc2

FC SDK

2.2.0

opencv

OpenCV

7.0.0

tablestore

Tablestore SDK

5.0.7

body

HTTP body parsing library (body)

5.1.0

raw-body

HTTP body parsing library (raw body)

2.4.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud SDK of POP API

1.7.9

alicloud/fnf

Workflow SDK

1.1.0

References