Closed D-Pagey closed 2 years ago
This is some misconfiguration issue in @sentry/next setup, so moving it to appropriate repo.
Hi, @D-Pagey!
Sorry you're having trouble. This is curious to me. It's easily fixable but I'd like to understand it first. We automatically pick up the SENTRY_AUTH_TOKEN
env variable, as you can see here, but not one with NEXT_PUBLIC
at the beginning.
Where are you setting the environment variable which is causing the prefix to be added? (Or did you name it that way yourself?)
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Just in case someone finds its way via Google here, I had the same issue. Connected Vercel and Sentry via UI and ran into this error.
It took some time to discover, that the integration has set up everything correctly, but the environment variables in Vercel were set to production only, which caused the build on preview fail.
Docs should be updated to make this clear. Will update if I find time and no one else has gotten around to it by then.
@MartinSeeler's solution worked for me! Basically need to add to the webpack config in next.config.js
and then add it to the vercel environment variables!
Environment
"@sentry/nextjs": "6.16.1"
Steps to Reproduce
✅
yarn build
locally works fine 🛑yarn build
on Vercel fails due to auth tokenExpected Result
Actual Result
Questions