Install and Configure SFRA Tools

Configure the app_storefront_base cartridge and any plugin cartridges you want for your storefront.

Downloading and Installing Development, Debugging, and Deployment Tools

You can contribute to the dwdebugger repository, which uses the Script Debugger API to provide debugging capabilities for VSC and node-inspector.

If you want to upload your code automatically, use the upload tool included with the sgmf-scripts command-line tools.

Installing npm Dependencies for SFRA

SFRA depends on modules managed by npm. If you downloaded the repository as a .zip file, these instructions assume that you have expanded it.

  1. Open a command prompt and navigate to the storefront-reference-architecture directory.
  2. Download and install Node.js version 12.21.0 (which has been tested with SFRA). You can test whether node is installed by entering:
    node -v
    If node is already installed, this command returns a version number. If it's installed, skip to the next step.
    Note: B2C Commerce uses Node.js only for npm dependency management.
  3. Use npm to install the modules included with SFRA. This approach is possible only if you're in the storefront-reference-architecture directory and you installed Node.js.
    npm install
    Important: Run this command any time you download a new version of SFRA, because the dependencies included with the application sometimes change.

Installing SFRA Command-Line Tools

While packages are easy to install globally on most operating systems, it can be complicated to globally install packages on the Mac OS/X. If you're working on a *nix or Window system, we recommend that you install the command-line build tools for SFRA globally. This approach makes it simple to create custom cartridges with the correct structure anywhere on your development machine.
npm install -g sgmf-scripts

After installation, you can use the sgmf-scripts command-line tools in any directory on your machine with a syntax similar to:

sgmf-scripts --help

If you're installing on a Mac and get an EACCES error, try Fixing Your Permissions to globally install the node. Adjust your node installation if necessary. This process can be time-consuming. Global installation isn't necessary, but it eliminates the installation step for any new cartridge.

If you want to install sgmf-scripts locally, enter:

npm install sgmf-scripts
After installation, you can use sgmf-scripts in the current folder with a syntax similar to:
node node_modules/sgmf-scripts --help
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.