To be able to make changes to NTK such as adding a new widget you create, you must install the current version of NTK from Github with the command line on your computer or device. This page describes how to do this complete installation.
If you simply want to use NTK to author projects, see the Install NTK page.
Instructions
1 Install Node and NPM
One Time Only: You must first install node and npm if you have not already done so.
- Mac or Windows, install Node and NPM from the official Node.js website using their standard installer (we’ve tested up to v4.2.2)
- Linux – You most likely have Node/NPM already installed.
- If you are on Raspberry Pi, then you may have an outdated version of Node. Here’s a nice & easy upgrade method: https://github.com/DonaldDerek/rPi-cheat-sheet
If you are on a Mac, you may need to install the Xcode command line tools by installing Xcode (free from the Mac app store).
2 Install dependencies
One Time Only: You need to install command-line tools: Ruby, bower, SASS, and the require.js build tool if you do not have them already. Again, copy each line, one at a time, from below and past it into your terminal and hit return.
npm install -g bower
npm install -g requirejs
sudo gem update --system
sudo gem install sass
3 Install Current Version of NTK
Decide where on your storage drive you want this installation of NTK to be, and “cd” to that directory. On the Mac we recommend /Applications . This process will create a new directory called “ntk” in that place. Copy each line and hit return, one at a time.
cd /Applications # or other location
git clone https://github.com/netlabtoolkit/ntk.git
cd ntk
bower install
npm install
npm run build
Note: if you are running Linux, you will have to set proper permissions on your Arduino in order to use it. For instance:
# Linux users only
sudo chmod a+rw /dev/ttyUSB0
4 Update to latest version
If you’ve already installed NTK, and want to update to the most current version, do the following
cd /Applications/ntk # or wherever your installation is
git pull
npm run build