All Products
Search
Document Center

Function Compute:Environment overview

Last Updated:Sep 05, 2025

This topic describes the runtime environment for Node.js functions in Function Compute.

Node.js runtimes

The following table lists the Node.js runtimes that Function Compute supports.

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

Function Compute no longer supports Node.js 4.4, Node.js 6, Node.js 8.x, or Node.js 10.x runtimes. For more information, see Runtime deprecation policy.

Specify a handler as an ES module

Function Compute supports ECMAScript (ES) modules in the Node.js 18 runtime and later. In earlier runtimes, such as Node.js 16 and older, Function Compute supports only CommonJS modules.

You can specify your code as an ES module in one of two ways.

  • Set the type field in the function's package.json file to module. This specifies all .js files as ES modules.

  • Use the .mjs file name extension. This treats files with the .mjs extension as ES modules and files with the .js extension as CommonJS modules. You can mix both module types in your function using the appropriate file extensions.

Built-in Node.js modules

In addition to the standard modules of Node.js, the Function Compute Node.js runtime environment includes several common modules that you can directly reference. Function Compute provides the following common modules:

Node.js 20 and Node.js 18

Module name

Description

Version

co

Control flow

4.6.0

gm

Image processing library

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

5.1.0

raw-body

HTTP body parsing library

2.5.2

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud POP API SDK

1.7.13

Node.js 16

Module name

Description

Version

co

Control flow

4.6.0

gm

Image processing library

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

5.1.0

raw-body

HTTP body parsing library

2.5.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud POP API SDK

1.7.12

Node.js 14

Module name

Description

Version

co

Control flow

4.6.0

gm

Image processing library

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

5.1.0

raw-body

HTTP body parsing library

2.4.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud POP API SDK

1.7.9

alicloud/fnf

Workflow SDK

1.1.0

Node.js 12

Module name

Description

Version

co

Control flow

4.6.0

gm

Image processing library

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

Visual algorithm library

7.0.0

tablestore

Tablestore SDK

5.0.7

body

HTTP body parsing library

5.1.0

raw-body

HTTP body parsing library

2.4.1

ali-mns

MNS SDK

2.6.8

alicloud/pop-core

Alibaba Cloud POP API SDK

1.7.9

alicloud/fnf

Workflow SDK

1.1.0

References