Skip to content

Source maps

View Markdown

Upload your source maps so production stack traces symbolicate back to the code you wrote.

Production bundles are minified, so a raw stack trace reads like gibberish. Upload your source maps and Everock can resolve supported matching frames back to the original file and line. Correct release IDs, served-file URLs, and available maps are required.

Upload after each build

Install the build executable in the application that uploads maps:

npm install -D @everock/sdk

The everock-sourcemaps CLI finds the .js.map files your bundler emitted and ships them, keyed by release. Add it to your build script:

package.json
"scripts": {
  "build": "next build && pnpm exec everock-sourcemaps"
}

Configure

Set the secret key

Uploading uses your secret key (ik_…), never the public one. Keep it in server and CI environments only.

.env (CI)
EVEROCK_API_KEY=ik_your_secret

Provide a release

The maps are stored per release so a stack from that build resolves against the right code. On Vercel and Cloudflare the commit SHA is detected automatically; otherwise set EVEROCK_RELEASE.

Terminal
EVEROCK_RELEASE=$(git rev-parse HEAD) pnpm exec everock-sourcemaps

Build directory

The CLI auto-detects the output and the URL each minified file is served at — .next (served under /_next), dist, or build. Override it when needed:

Terminal
pnpm exec everock-sourcemaps --dir dist/assets --url-prefix /assets --release v1.4.2

Framework setup: Next.js · Vite.