Nextjs: sentry returns error if you change the build directory

Hey guys,
Do to some design limitations I have to change the build directory from .next to something else, like nextjs. The problem is that when I build the app with a different build directory, I get the following error, which looks like being from Sentry. How can I specify the correct build directory the sentry should look for?

info - Using external babel configuration from /Users/hamidreza/workspace/mentordb/.babelrc
error: .next/: IO error for operation on .next/: No such file or directory (os error 2)

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.

error: .next/: IO error for operation on .next/: No such file or directory (os error 2)

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.
info - Creating an optimized production build

Thanks