Lab - Getting Started with Catalyst
Lab - Getting Started with Catalyst
Lab - Getting Started with Catalyst
In this exercise, you will walk through the steps to set up your own local Catalyst project, connected to your BigCommerce store. You’ll be able to use your local installation as a valuable point of reference as we examine Catalyst’s architecture.
In this lab, you will:
Prerequisites
For following along in the code in future lessons, it’s also helpful to make sure you have a code editor, like VS Code, to open your Catalyst project once installed.
If you run into an error related to your maximum number of active storefronts during the Catalyst CLI installation, this means you do not have sufficient storefront seats.
In Channel Manager in your store control panel, you will need to either delete/deactivate a channel, “Add new” and confirm/update all requirements for multi-storefront if you haven’t previously done so, or else use a different sandbox store with an available seat.
Node Version Manager (nvm) is an alternative way to install Node.js and allows you to install and use different versions.
With nvm installed, you can install a specific version:
nvm install 24
… and switch to the Node.js runtime of any version you have installed:
nvm use 24
Whether you use nvm or install Node.js via another method, make sure you are running a compatible version:
node -v
Once the provisioning process is begun, you will need to wait for the initial deployment to complete.

Proceed with the following steps after deployment is complete.
You can return to the storefront overview page at any time by navigating to Channel Manager (or Channels) in your control panel and clicking on the Catalyst storefront channel.
The process used to create your new storefront, referred to as One-Click Catalyst, has provisioned several things:
Note that the new channel page includes a CLI command in the “Complete Setup” section that can be used to immediately set up a local project connected to your new storefront. We’ll be using a version of the command with different options in the next step, but the principle is the same.
Troubleshooting
The pnpm command is unrecognized.
In some environments where file permissions are highly restricted, you may need to prepend corepack to the use of pnpm commands (for example, corepack pnpm dlx create-next-app@latest ...)
You will eventually be presented with the BigCommerce device authorization URL - https://login.bigcommerce.com/device/connect - and a unique code.
With authorization completed, back at the command line, there will be new installation steps to complete.
The completion of the installation may take a few minutes. The installer will install the Catalyst code files into your local project, install all npm dependencies, and configure your store information and credentials.
The CLI installer can also be used to create a new Catalyst storefront, bypassing the control panel process. This performs the same provisioning as in the control panel, including the preview deployment, Makeswift site, sample data, and language selection.
Note, however, that currently this is only supported on stores where the One-Click Catalyst flow in the control panel has been used previously.
Remember, your project working directory will be named using the project name you entered in the first installer step.
http://localhost:3000)Provided that you chose to install sample data when creating your Catalyst storefront, you should see a fully populated storefront home page. Your local site should be nearly identical to your hosted preview environment, although as previously noted, there may be differences between the installed codebase and the deployed preview.

This “(Dev)” site in Makeswift has largely the same starter content as the main preview site but is powered directly by the project running on localhost. This is useful for seeing the effects of your local customizations within the Makeswift builder.
The main site and dev site are completely independent of one another. Content built or changed in one will not affect the other.
Troubleshooting
If you encounter an error while starting the dev server related to an issue finding a matching keyid, you may need to upgrade a pre-existing corepack_version.
npm install -g corepack@latest
Unlike the values in .env.local, the values in .catalyst are only used by the CLI installer, not by the storefront application itself, and so these values do not correspond to any environment configuration that must be set up in deployment environments.
At various points while working in your local project, you may need to restart your dev server or clear the Next.js or Turborepo caches. Below is an example set of steps to do all three.
Make sure only to clear a given cache when necessary. It is generally not necessary to clear the Turborepo cache to make sure your storefront content is up to date.