Getting Started

Installation

Edit this page

Prerequisites

  • Node.js: version 18 or higher
  • Package Manager: npm, pnpm, or yarn
  • TypeScript: version 5.0 or higher recommended

Install Package

Run the following command in your terminal to install the core gateway package:

1npm install @commercegateway/commerce-gateway
1pnpm add @commercegateway/commerce-gateway
1yarn add @commercegateway/commerce-gateway

Dependencies

The core package is designed to be lightweight with minimal dependencies. However, depending on the adapters and backends you use, you may need additional packages:

For Redis Sessions

If you plan to use Redis for session management:

1npm install ioredis

For Shopify Backend

If you use the built-in Shopify backend:

1npm install @shopify/shopify-api

For Hono Server

If you want to use the Hono-based HTTP adapter:

1npm install hono @hono/node-server

TypeScript Configuration

Ensure your tsconfig.json has esModuleInterop and skipLibCheck set to true:

1{
2 "compilerOptions": {
3 "target": "ESNext",
4 "module": "ESNext",
5 "moduleResolution": "node",
6 "esModuleInterop": true,
7 "skipLibCheck": true,
8 "strict": true
9 }
10}

Next Steps

Now that you've installed the package, follow the Quickstart to build your first conversational commerce gateway.