Skip to main content

Installation

Dependencies

  • npm and node.js - Required versions are specified in the package.json file.

  • vercel cli- Installation instructions here

  • Environment variables - each of the applications contained in this monorepo require an .env.local file in order to run locally. Use vercel env pull command from each app to populate the .env.local file automatically.

    e.g, to pull environment variables for the web app:

    cd apps/web
    vercel env pull

    NOTE: You will need to connect the repo to your Vercel project using vercel link --repo if you haven't already.

Installation

All of the steps below should be run from the root level of the repository. In general when working with Turborepo you want to be running npm scripts from the root or your're going to have a bad time.

  1. Install dependencies

    npm install
  2. For whichever app you are trying to run, ensure you have a .env.local file properly configured. So if you want to run the web ecommerce store, ensure you have a file in this directory

    /apps/web/


Running Locally

  1. The default dev task of the repo runs the web storefront in dev mode.

    npm run dev
  2. For running the other tasks you can use the Turborepo npm package and apply filters. Examples:

    • Running the docs site: npx turbo run dev --filter=docs

    • Linting a particular package only: npx turbo run lint --filter=@hv/commerce

    • Type checking a particular package only: npx turbo run type-check --filter=@hv/commerce