Welcome, Guest Login

Public Cloud Center

Setting the Node Version

Last Updated: Feb 23, 2017 10:23AM EST

All Modulus projects have the option to specify any version of Node.js, which we encourage you to do. This includes both stable and unstable releases. Modulus makes use of the package.json engines field for controlling the version at both build and run time.

If a version is not specified, projects will use the latest version Node.js.
If no package.json file is specified, get-version will return the latest version for the specified engine.

To specify a version for your project, you need to define a "node" or "iojs" engine version in your package.json, like so:

{
  "engines": {
    "node": "0.10.38"
  }
}

Since versions of io.js and Node.js don't overlap. The "node" engine parameter can control both Node.js and io.js versions. You can also use a more specific "iojs" engine parameter if you'd like. For example, the following two statements both result in using io.js version v2.3.3.

{
  "engines": {
    "node": "2.3.3"
  }
}

{
  "engines": {
    "iojs": "2.3.3"
  }
}

If both parameters exist, Modulus will use the node version.

If the version is invalid, Modulus will default back to the most recent stable version of Node.js. Once deployed, your build output and application logs will show entries displaying the version of Node.js selected for use.

Modulus projects can also choose the version of npm used to install dependencies. By default the most recent stable version is installed on each deploy. To set the version of npm, simply define a "npm" engines parameter.

{
  "engines": {
    "npm": "2.12.1"
  }
}

If the version is invalid, Modulus will default back to the most recent stable version of npm.

Go to top
 

Contact Us

    Our Support Policy
    Submit a Support Request

  • Public Cloud Support Hours
    9am-5pm EST Mon-Fri
    Outside of these hours response times may be up to 24hrs.


    Submit a support ticket by clicking 'status and support' icon on the left side of this page.



help@hellotangible.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en_us/portal/articles/autocomplete