Edit /client/ files - Yarn install

Last updated 4 days ago

For the Rover development we use Yarn package manager

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 https://deb.nodesource.com/setup_8.x | 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: https://yarnpkg.com/en/docs/cli/

Run:

curl -o- -L https://yarnpkg.com/install.sh | 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.