Installation
Requirements
Make sure you have
Git
installedNote: before installing new packages, make sure your current packages are up-to-date to avoid conflicts.
OpenCircuits uses yarn to manage building and testing with dependencies. Yarn is a superset of NPM and is the recommended manager.
Additionally, we use Golang as our backend language. Choose your system below for instructions on installing these.
- Windows
- macOS
- Linux
- Docker
note
It's highly recommended to use (the admittedly terrible) built-in Command Prompt. We have yet to find a working solution with WSL, but please feel free to let us know if you figure it out!
NPM
Install the LTS version of npm here and make sure it works by typing npm --version
in the command prompt.
(Note: after installing it make sure to restart command prompt so that the command gets recognized)
Then, to install Yarn, run
npm install -g yarn
And again, make sure it works by typing yarn --version
.
warning
If you run into ERR: cb.apply is not a function:
click here
Go
Download and run the MSI installer here
Restart command prompt and verify that it worked by typing go version
.
Homebrew
note
We highly recommend installing homebrew as it makes life much easier. And we will assume you have it installed for the rest of these instructions.
NPM / Yarn
To install NPM, simply run
brew install npm
Make sure it works by typing npm --version
in the terminal.
Then, to install Yarn, run
npm install -g yarn
And again, make sure it works by typing yarn --version
.
Go
To install type the following line:
brew install go
Verify that it works by typing go version
NPM
note
If you're using Ubuntu you may need to uninstall the built-in "yarn" from cmdtest
, by doing
sudo apt-get remove cmdtest
For Ubuntu, type
sudo apt-get install nodejs
For Arch-based distributions, install the
npm
package from thecommunity
repository.For gLinux, you must first install NVM (Node Version Manager) via
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Make sure this works by doingnvm --version
Then donvm install node
and you should be all set up!
After installing, verify that it works by typing npm --version
Then, to install Yarn, run
npm install -g yarn
And again, make sure it works by typing yarn --version
.
Go
To install, follow the instructions here
After installing, verify that it works by typing go version
For information on installing Docker on your machine, see the Docker docs here.
To build Docker image, simply run:
npm run docker:build
To start the Docker container, simply run:
npm run docker:stop
To stop and remover the Docker container, simply run:
npm run docker:stop
Builds of Docker images are available on the Docker Hub and are built and tagged for each branch of the repository.
Installation
After sucessfully installing the required dependencies for the project, you can now install OpenCircuits locally!
First, you have to clone the repository to your system
git clone https://github.com/OpenCircuits/OpenCircuits
Then, you can navigate to it
cd ./OpenCircuits
And finally, run the following to install the project dependencies!
yarn