Before we begin, a little more on Node for context—unlike iTunes or Photoshop, you won’t be able to launch Node from your dock or taskbar. You will be using command line instructions via a tool such as Terminal or Windows Command Prompt. If you don’t have Node.js and/or npm installed on your machine, do the following for your respective OS.
Go to nodejs.org, click ‘install’, and run through the install process.
Run the following on your command line to install the source for nodejs
curl -sL https://deb.nodesource.com/setup | sudo -E bash -
Then, run this to get the latest nodejs package
sudo apt-get install -y nodejs
Go ahead the download the Windows binary and make sure to restart your computer.
node -v
To see if Node is installed, type the above on your command line.
npm -v
To see if npm is installed, type the above on your command line.
npm install cobol
To add this npm package to your local machine, type the above into your command line. You’ll notice a node_modules directory appear in your root where the package is now installed.
If you're having trouble installing packages, check out the helpful docs for installing npm packages locally
npm initcreates a package.json in root for you
npm listlists all installed packages
npm pruneremoves packages not depended on by your project according to your package.json
npm outdatedtells you which installed packages are outdated with respect to what is current in the npm registry but allowable by the version definition in your package.json