tencent cloud

Feedback

Notes on Node.js

Last updated: 2022-04-29 15:55:42

    Node.js Version Selection

    Currently, the following versions of Node.js programming language are supported:

    • Node.js 16.13
    • Node.js 14.18
    • Node.js 12.16
    • Node.js 10.15
    • Node.js 8.9 (deactivating soon)
    • Node.js 6.10 (deactivating soon)

    You can choose a desired runtime environment when creating a function.

    Environment Variables

    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.

    Included Library and Usage

    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.

    COS SDK

    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.

    Built-in library in environment

    The following libraries are supported in Node.js runtime:

    Library NameVersion
    cos-nodejs-sdk-v52.5.20
    base64-js1.3.1
    buffer5.5.0
    crypto-browserify3.12.0
    ieee7541.1.13
    imagemagick0.1.3
    isarray2.0.5
    jmespath0.15.0
    lodash4.17.15
    microtime3.0.0
    npm6.13.4
    punycode2.1.1
    puppeteer2.1.1
    qcloudapi-sdk0.2.1
    querystring0.2.0
    request2.88.2
    sax1.2.4
    scf-nodejs-serverlessdb-sdk1.1.0
    tencentcloud-sdk-nodejs3.0.147
    url0.11.0
    uuid7.0.3
    xml2js0.4.23
    xmlbuilder15.1.0
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support