Next.js 13 app directory support #7999
Replies: 9 comments 15 replies
-
I'm sure you folks know about this already, but
|
Beta Was this translation helpful? Give feedback.
-
Hey @lforst, is there an example repo of Sentry with NextJS 13 and the now stable app dir? I used the set-up wizard for NextJS but ended up pulling everything out because I didn't have confidence it was working correctly. I was getting errors locally and I wasn't sure the extent of the support. Thanks so much! |
Beta Was this translation helpful? Give feedback.
-
Hi @lforst I am currently experiencing this error:
I have created an empty repo just to see if the error exists by default and yes. I am using Windows. I created a new next repo with npx create-next-app@latest and then manually installed Sentry via npm install --save @sentry/nextjs and created the files described in their documentation: sentry.client.config.ts, sentry.server.config.ts, sentry.edge.config.ts Then added the changes next.config.js to include Sentry: const { withSentryConfig } = require("@sentry/nextjs"); /** @type {import('next').NextConfig} */ module.exports = withSentryConfig(nextConfig); Any help would be welcomed. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello all ! We are trying to integrate sentry on next app dir integrated with next-intl. after running the wizard, we are seeing this error
Any one else with similar issue ? |
Beta Was this translation helpful? Give feedback.
-
Its related with #8416 (comment), i solved it after removing exports from middleware |
Beta Was this translation helpful? Give feedback.
This comment has been minimized.
This comment has been minimized.
-
Hello. I'm trying to integrate Sentry into my NextJS app directory, but I'm having trouble understanding why my errors aren't being logged. Client side errors, and error in my tRPC calls are being logged fine, but when I have an error in my page render I'm getting nothing. When I look in the Vercel deployment logs, I see two errors:
I'd expect to the 1 in Sentry, but it's not coming through. Based on the roadmap and #6953, I feel like I should be seeing the error logged in Sentry. Is there something that I'm doing wrong? fwiw I've set up my application using the wizard, so maybe there's a necessary manual step? |
Beta Was this translation helpful? Give feedback.
-
Hey @lforst Simplified error boundary: // app > foo > bar > error.tsx
'use client'
import { captureException } from '@sentry/nextjs'
import { useEffect } from 'react'
export default function Error({ error }: { error: Error }) {
useEffect(() => {
captureException(error)
}, [error])
return (
<div>
<h2>Something went wrong in this local page</h2>
<p>{error?.message}</p>
</div>
)
} I'm using Given a thrown Is this a known issue? Am I missing some kind of setup? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Update: Next.js App Directory is fully supported now.
Important
If you have problems, please open a new issue with concrete reproduction steps! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions