Currently, the following versions of Node.js programming language are supported:
You can choose a desired runtime environment when creating a function.
The environment variables built in the current Node.js runtime environment are as shown in the table below:
Node.js Version | Environment Variable Key | Specific Value or Value Source |
---|---|---|
Node.js 16.13 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node16/lib/node_modules:/opt:/opt/node_modules |
Node.js 14.18 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node14/lib/node_modules:/opt:/opt/node_modules |
Node.js 12.16 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node12/lib/node_modules:/opt:/opt/node_modules |
Node.js 10.15 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node10/lib/node_modules:/opt:/opt/node_modules |
Node.js 8.9 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node8/lib/node_modules:/opt:/opt/node_modules |
Node.js 6.10 | NODE_PATH |
/var/user:/var/user/node_modules:/var/lang/node6/lib/node_modules:/opt:/opt/node_modules |
For more information on environment variables, see Environment Variables.
Note:For Node.js 14.18 and later, the platform no longer has additional built-in dependency libraries. For more information on the dependencies required by code execution, see Dependency Installation and Online Dependency Installation.
SCF's runtime environment for Node.js 12.16 or earlier already contains the COS SDK for Node.js, and the specific version is cos-nodejs-sdk-v5
.
The COS SDK can be referenced and used within the code as follows:
var COS = require('cos-nodejs-sdk-v5');
For more information on how to use the COS SDK, see COS SDK for Node.js.
The following libraries are supported in Node.js runtime:
Library Name | Version |
---|---|
cos-nodejs-sdk-v5 | 2.5.20 |
base64-js | 1.3.1 |
buffer | 5.5.0 |
crypto-browserify | 3.12.0 |
ieee754 | 1.1.13 |
imagemagick | 0.1.3 |
isarray | 2.0.5 |
jmespath | 0.15.0 |
lodash | 4.17.15 |
microtime | 3.0.0 |
npm | 6.13.4 |
punycode | 2.1.1 |
puppeteer | 2.1.1 |
qcloudapi-sdk | 0.2.1 |
querystring | 0.2.0 |
request | 2.88.2 |
sax | 1.2.4 |
scf-nodejs-serverlessdb-sdk | 1.1.0 |
tencentcloud-sdk-nodejs | 3.0.147 |
url | 0.11.0 |
uuid | 7.0.3 |
xml2js | 0.4.23 |
xmlbuilder | 15.1.0 |
Was this page helpful?