솔라나 문서빠른 시작
구축하려는 대상에 따라 필요한 Commerce Kit 패키지를 선택하세요. 각 패키지는 독립적으로 설치 가능하며 단독으로 사용하거나 다른 패키지와 함께 사용할 수 있습니다.
시스템 요구사항
- Node.js: 버전 18 이상 (LTS 권장)
- 패키지 관리자: pnpm, npm 또는 yarn
- TypeScript: 버전 4.5 이상 (권장하지만 필수는 아님)
공통 Peer Dependencies
Solana Commerce Kit은 Solana Kit 라이브러리를 기반으로 구축되었으므로 Solana Kit, Gill, Solana Programs Clients 및 Codama로 생성된 JS Clients와 호환됩니다.
pnpm add gill # or @solana/kitpnpm add @solana-program/token # or @solana-program/target-programpnpm add @my-program/codama-js-client
TypeScript 구성
TypeScript를 사용하는 경우 tsconfig.json에 다음을 포함해야 합니다:
{"compilerOptions": {"module": "ESNext","target": "ES2020","lib": ["ES2020", "DOM", "DOM.Iterable"],"jsx": "react-jsx","moduleResolution": "bundler","resolveJsonModule": true,"esModuleInterop": true,"skipLibCheck": true}}
Next.js 구성
Next.js를 사용하는 경우 Commerce Kit 패키지를 트랜스파일하도록
next.config.js를 업데이트하세요:
/** @type {import('next').NextConfig} */const nextConfig = {transpilePackages: ["@solana-commerce/react","@solana-commerce/connector","@solana-commerce/headless","@solana-commerce/solana-pay","@solana-commerce/sdk"]};export default nextConfig;
Is this page helpful?