Summary
The root build command automatically runs a Sentry release creation and sourcemap upload after turbo run build.
This makes normal local and CI builds depend on Sentry credentials and attempts to upload a root-level dist directory that the Turbo build does not produce.
Current behavior
package.json:
{
"scripts": {
"build": "turbo run build",
"sentry:sourcemaps": "_SENTRY_RELEASE=$(sentry-cli releases propose-version) && sentry-cli releases new $_SENTRY_RELEASE --org=supermemory --project=consumer-app && sentry-cli sourcemaps upload --org=supermemory --project=consumer-app --release=$_SENTRY_RELEASE --strip-prefix 'dist/..' dist",
"postbuild": "bun run sentry:sourcemaps"
}
}
Running:
first completes the Turbo build, then invokes sentry:sourcemaps.
Problem
- Local builds fail unless Sentry authentication/configuration is available.
- CI build validation also requires deployment-only credentials.
- The upload script targets
dist, while application builds such as Next.js produce .next output.
- The Sentry command uses POSIX shell syntax, which may not be portable to Windows environments.
Expected behavior
bun run build should only build and validate the repository. Sentry releases and sourcemap uploads should run only in an explicit deployment/release workflow, with the correct application output path.
Proposed fix
- Remove the root
postbuild hook.
- Keep Sentry upload as an explicit command, e.g.
bun run sentry:sourcemaps.
- Invoke that command only from the production deployment pipeline after the relevant app build.
- Update the sourcemap path and
--strip-prefix to match the deployed app’s actual build output.
- Prefer a cross-platform environment-variable approach or run the release step in the CI shell that owns deployment.
Acceptance criteria
bun run build succeeds without SENTRY_AUTH_TOKEN or other Sentry configuration.
- No Sentry release/upload is attempted during ordinary builds.
- Production deployment still creates the intended Sentry release and uploads valid sourcemaps.
Summary
The root
buildcommand automatically runs a Sentry release creation and sourcemap upload afterturbo run build.This makes normal local and CI builds depend on Sentry credentials and attempts to upload a root-level
distdirectory that the Turbo build does not produce.Current behavior
package.json:{ "scripts": { "build": "turbo run build", "sentry:sourcemaps": "_SENTRY_RELEASE=$(sentry-cli releases propose-version) && sentry-cli releases new $_SENTRY_RELEASE --org=supermemory --project=consumer-app && sentry-cli sourcemaps upload --org=supermemory --project=consumer-app --release=$_SENTRY_RELEASE --strip-prefix 'dist/..' dist", "postbuild": "bun run sentry:sourcemaps" } }Running:
first completes the Turbo build, then invokes
sentry:sourcemaps.Problem
dist, while application builds such as Next.js produce.nextoutput.Expected behavior
bun run buildshould only build and validate the repository. Sentry releases and sourcemap uploads should run only in an explicit deployment/release workflow, with the correct application output path.Proposed fix
postbuildhook.bun run sentry:sourcemaps.--strip-prefixto match the deployed app’s actual build output.Acceptance criteria
bun run buildsucceeds withoutSENTRY_AUTH_TOKENor other Sentry configuration.