Sentry Reported an Error: Invalid Token (Http Status: 401) - Sentry Nextjs

Sentry Reported an Error: Invalid Token (Http Status: 401) - Sentry Nextjs

After integration sentry in my project the dev environment works fine but when I try to build the project with yarn build i face this error.

Sentry CLI Plugin: Command failed: /Users/ishman/Desktop/sh/web-speedhome/node_modules/@sentry/cli/sentry-cli releases new RUwbSqUhmn7T-kxjDJebz error: API request failed caused by: sentry reported an error: Invalid token (http status: 401)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output. Please attach the full debug log to all bug reports.

My configuration file for sentry

import * as Sentry from '@sentry/nextjs'
import { SENTRY_DSN } from './env'

Sentry.init({
  dsn: SENTRY_DSN,

  tracesSampleRate: 1,
  integrations: [new Sentry.BrowserTracing({})],

})

And my sentry.properties file

defaults.url=
defaults.org=org
defaults.project=project
auth.token=token

cli.executable=../../../.npm/_npx/a8388072043b4cbc/node_modules/@sentry/cli/bin/sentry-cli

5
David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.