- Install Yarn
- Configure workspaces
- Integrate npm-run all
- Organize packages
- Build the project
- Use Yarn commands
Install Yarn
Install Yarn, version 3.8.1 or later. For installation instructions, see Yarn installation documentation.Configure workspaces
Create.yarnrc.yml file in your project’s root folder (example,vegaworkspaceapp/), and add this configuration:
Integrate npm-run-all dependency
Complete the following steps:
-
Use the
NPM_EXECPATHto set the path to Yarn. -
Set the
NPM_EXECPATHenvironment variable in your.bashrcor.zshrcfile:You can useNPM_EXECPATHdirectly at the command prompt when running with Yarn.
Organize packages
If you have the project setup with React Native for Vega apps and turbo modules, skip to Build the project. To organize packages, complete the following steps:-
In your project’s root folder, create a
packages/folder. -
When you create a React Native for Vega app and a turbo module sub-projects in this workspace project, generate these projects in their own folders under
packages/folder usingvega project generatecommands. The project structure looks like this:
Build the project
-
Add scripts to the project’s root package.json.
- Add more packages to the project as required. Follow the steps in Organize packages.
Use Yarn commands
To install dependencies and build, use the applicable Yarn commands:- For Workspaces
- For React Native for Vega app
- For Turbo Module project

