Steps to install dependency using NPM

  1. Create a project from a JavaScript (Node.js) template.
  2. Open terminal and type npm install <package_name>, replace <package_name> with a name of NPM dependency that you want to install.
  3. For example, let’s install the chalk NPM module with the following command:
npm install chalk
  1. Update your code to use new dependency:
import chalk from 'chalk';

console.log('Hey! It\\'s in red!'))
  1. Tap the Run button and check out the result!
Powered by Fruition