Closed cyrus-za closed 3 years ago
Hi, @cyrus-za. Thanks for reporting this. I believe it's related to https://github.com/getsentry/sentry-javascript/issues/3854. Does that match your understanding?
Thanks that looks like the exact issue. Closing this one so we can keep the discussion going there
@cyrus-za does this work for you? For me in still doesn't work with NX :( I did find a way to make it work though. Will make a PR soon
In the end a PR was not needed just adding: include: 'dist/apps/<app-name>/.next'
to the sentry webpack config did the trick. The documentation for this could be improved though 😉
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)@sentry/nextjs
Version:
Description
Error:
This happens when trying to build the nextjs app and it results in no source maps being uploaded, but the build still passes.
This used to work and I am not sure what broke it around 2 weeks ago (didn't realise it was a problem until we started tackling sentry errors and found no source maps for these apps).
Background info
This is a monorepo using nx workspaces and consists of multiple nextjs apps, all of which are experiencing this bug.
I reached out to the vercel and nx team and they are stating that it is expected that it will not find the .next directory as we got a monorepo setup and our apps go in
dist/appName/.next
so it appears that we need to somehow configure the sentry webpack plugin (which we use in next.config.js) to upload the sourcemaps. I checked the docs and it is not clear how to do this.next.config.js
Full error message on verce
Vercel settings