Would you like to contribute to the Titanium docs? To get started, sign up for an account on the Appcelerator Wiki and sign our CLA.

Skip to end of metadata
Go to start of metadata
Contents

Node.js is required for several Appcelerator components, including the new Titanium CLI, Alloy, and the Node.ACS CLI. Node is also required to build the Titanium SDK from source starting with Release 3.0.

Compatibility and Download

To run all Appcelerator components, you must have Node.js 0.10.x or later.

On Mac OS X and Windows, if you have selected to install Titanium updates, Studio prompts you to install Node.js. On Linux, you need to manually install Node.js.

Operating System

Min Node Version

Max Node Version

Download Location

macOS / Windows / Linux

6.x

8.x

Official Website

Installation

Before installing the CLI, you should decide where you want the Node Package Manager (npm) to install packages. By default npm installs into /usr/local on OS X and Linux, which requires that you run npm as root. This is not recommended. You can avoid having to run npm by doing one of the following:

  • Make the /usr/local directory writable by all:

  • Set npm to install to your home directory, or another directory of your choosing by setting the npm prefix. For example, you can add the following to your .bash_profile or other initialization file:

    Alternately, you can create a .npmrc file in your home directory with the following contents:

    Where /path/to/home is the path to your home directory. Setting the npm prefix to your home directory causes the npm packages to be installed to $HOME/lib/node_modules and launch scripts are installed in $HOME/bin. $HOME/bin must be in your PATH.

If you change your prefix after installing npm packages, you will have to reinstall packages. If you change the permissions on /usr/local after installing packages as root, you may need to change the ownership of the npm cache folder, as described in Troubleshooting npm Problems.

Troubleshooting

Error: EONT, stat `C:\Users\<USER_NAME>\AppData\Roaming\npm`

The error message indicates the directory is missing.  To resolve this issue, manually create the directory:

Issues Installing NPM packages

If you experience an issue installing any of the npm packages, try the following:

  • Check permissions. If you originally ran npm using sudo, you may need to change the ownership of the npm cache folder.

    On Windows, the npm cache defaults to npm-cache in the user's home directory. 

  • Clear the npm package cache:

  • Remove your .npmrc file.
  • No labels