Prerequisites
To work with Credo we need to install some dependencies and set-up our Node.js environment. Even when creating a mobile app in React Native, we need Node.js installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!
The specific items that we set-up:
Node.js
NodeJS is the most popular JavaScript runtime environment excluding browsers. It can run on your desktop or even a server.
- Windows
- macOS
- Linux
You can download it from the Node.js Website
Make sure you have Homebrew installed. If not you can install it with the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install Node.js with the following command:
brew install nodejs
Alternatively, you can download it from the Node.js Website
Either follow one of the specific steps for installing Node.js on linux below, or you can download it directly from the Node.js Website
Arch Linux
pacman -S nodejs npm
Debian
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs
Red Hat
curl -sL https://rpm.nodesource.com/setup_18.x | bash -
yum install nodejs
NPM
The Node Package Manager comes pre-bundled with the NodeJS installation from above.
Yarn
Only required when not using npm
For every platform, the installation of yarn is the same.
npm install --global yarn
Project Setup
Finally, you need to make sure you have a project set-up using Node.js or React Native. If you're not familiar with setting up a project, we suggest following the Introduction to Node.js or React Native Quickstart guides.