Skip to main content
Add @replohq/sdk as a dependency when you edit site code. Replo keeps the version current after that.

How it gets there

The SDK is a published npm package. Put it in the site’s package.json and install it:
A site scaffolded by Replo already includes this entry. When a new version ships, sites move to it automatically. You do not need to bump a version or run an install to pick up a fix. When you edit site code:
  • Add it as a dependency. List @replohq/sdk in package.json before you import from it.
  • Do not pin it. Replacing the managed version with a fixed one stops your site from receiving fixes, and Replo will move it back on the next update.

Working on the site locally

First use the versions declared by the checkout, such as packageManager, engines, .nvmrc, or .node-version. If none of those files declares a version, use Node.js 22 and pnpm 10. Then install and run the dev server as you would any Next.js app:
See Connect with Git for the clone URL and authentication. env -u REPLO_API_KEY removes the Git-only key from that child command while the parent shell keeps it for later Git commands. Use the prefix each time you launch the dev server, including after a restart. pnpm dev runs Next.js with Turbopack. If you switch to webpack with next dev --webpack, watch for this macOS failure:
Check the dev server output for Watchpack Error (watcher): Error: EMFILE: too many open files, watch. Webpack’s native file watcher failed, so Next.js treats your source folders as missing and serves only its 404 page. Stop the dev server, then restart it from the site folder with polling:
Polling picks up edits a few seconds later than native watching, so turn it on only when you see this error. The error affects only your local dev server, not your published site.

Remove an existing local development cache

As a precaution, if you previously started the dev server while REPLO_API_KEY was exported, stop the server. From the site root, delete its local development cache:
Restart with env -u REPLO_API_KEY pnpm dev. The next start recompiles the site.

Next steps

Setup reference

The provider, config, and script tags a site mounts once.

Data loaders

Render store data on a page.