Closed Soviut closed 4 months ago
Hello, thanks for writing in!
Just to confirm, do you have a valid auth token in your .env.sentry-build-plugin
file? If you run our wizard it should generate a valid token for you, see https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/vite/#automatic-setup.
@andreiborza That was it. I completely forgot about the .env.sentry-build-plugin
file.
What's frustrating is I even explicitly set a SENTRY_AUTH_TOKEN
in my .env.local
but it was missing quotes so the =
sign later on in the key must have confused it.
Environment
node 20.15.0 vite 5.3.2 @sentry/vite-plugin 2.20.1
Steps to Reproduce
Configure
vite.config.mts
withNote that the
org
is my "organization slug".The main error being
Invalid org token (http status: 401)
Expected Result
I should be able to run
npm run build
and my org setting (my organization slug) should be valid. The build should pass.Actual Result
When I run
npm run build
and get the following error.