Basic Setup
To start using NotCMS, you need to initialize a client with your schema and credentials:Prerequisites
Before initializing the client, ensure you have:- Generated schema - Run
npx notcms-kit initto generate for the first time ornpx notcms-kit pullto update your schema - Environment variables - Set up your API credentials
- Installed NotCMS - Add
notcmsto your project dependencies
Environment Variables
Required Variables
Loading Environment Variables
- Next.js
- Node.js
- Vite
Framework-Specific Setup
Next.js App Router
Remix
SvelteKit
Troubleshooting
Common Issues
Environment variables not loading
Environment variables not loading
- Check
.envfile exists in project root - Ensure you’re using a loader like
dotenv - Verify variable names match exactly
Authentication failed
Authentication failed
- Verify
NOTCMS_SECRET_KEYis correct - Check
NOTCMS_WORKSPACE_IDmatches your workspace - Ensure API key has necessary permissions
Schema not found
Schema not found
- Run
npx notcms-kit pullto generate schema - Check import path is correct
- Ensure schema file exports correctly
TypeScript errors
TypeScript errors
- Update to latest NotCMS version
- Regenerate schema with
npx notcms-kit pull - Check TypeScript version compatibility