TCS - edit client/ files - Yarn install

For the Rover development we use Yarn package manager. The tutorial will guide you through the process of enabling Yarn to build the software internally on the Rover. Although it's not the most convenient way (takes Raspberry Pi capabilities to build), but it's less dependent on your computer workspace.

If you need to edit any file located in /client/ folder, you need to rebuild the client before the changes take place.

1. Connect Turtle to the Internet

2. Install git

3. Install Node.js

Update Debian packages of Node.js to include NodeSource (won't work without).

curl -sL | sudo -E bash -

Then install latest Node.js

sudo apt-get install nodejs

4. Install Yarn

Little disclaimer: Yarn is a package managing software allowing to cut all the track file relations and distinguish development files and production files.

You're working on the development files (/client/src/) and during your work building lighter production files (/client/dist/). This allows to track all the unnecessary files with no relations.

Less intuitive, but a lot more efficient!

More info on Yarn:


curl -o- -L | bash

Then reboot the device: power off / power on or

sudo reboot

5. Check if Yarn works

Type for example:

yarn help

And see if responds.

6. Setup workspace directory

We're working on /opt/turtlerover/tcs/ folder, so we should link it to Yarn. Type:

yarn add /opt/turtlerover/tcs/

It should read package.json file located in the folder and check for dependencies.