Prerequisites
Volta
We use Volta to ensure consistent versions of Node.js, Yarn, and pnpm across all contributors. Volta automatically manages the correct versions based on thevolta field in package.json.
Install Volta:
Enable pnpm Support
Make sure to enable pnpm support in Volta if you want to run the E2E tests locally:.bashrc, .zshrc, etc.) to make it permanent.
Python
Due to package incompatibilities, building native binaries currently requires Python version < 3.12.
Initial Setup
Once you have the prerequisites installed, clone the repository and install dependencies:- Transpiles TypeScript code to JavaScript
- Generates type definitions
- Links packages together in the monorepo
- Ensures TypeScript can read all linked type definitions
Monorepo Structure
The Sentry JavaScript SDK is a monorepo containing 40+ packages, managed with Yarn workspaces and Nx.Workspace Configuration
All workspaces are defined in the rootpackage.json:workspaces field:
Version Management
Volta pins specific versions inpackage.json:
Verifying Your Setup
After completing the initial setup, verify everything is working:build/ directory with cjs/, esm/, and types/ subdirectories, and tests pass, your environment is ready!
Next Steps
Now that your environment is set up, you can:- Build packages for development
- Run tests to verify your changes
- Learn about the development workflow
- Explore the monorepo architecture