App directory support
Closed this issue ยท 8 comments
A few days ago, nextJS set app directory as stable version. Currently honeybadger is not working properly with this. Will you update it?
Hey @mcAnastasiou, thanks for submitting an issue!
Sure, we can update the package to support this.
In the meantime, can you please provide more information as to what is not working properly? This will help us when developing support for this feature.
Link to documentation around the new app directory.
Hey @mcAnastasiou, thanks for submitting an issue!
Sure, we can update the package to support this. In the meantime, can you please provide more information as to what is not working properly? This will help us when developing support for this feature.
Hey @subzero10 , thank you a lot for the response. The things that were not working are the following.
- Source maps were not uploading for the app directory
- Whereas i was able to see some errors on honeybadger for in development mode, i couldn't see them in production mode
@mcAnastasiou I have some updates to share:
- Source maps were not uploading for the app directory
I have an example app setup with the changes from this PR and source maps are successfully uploaded. I will push the example apps in the repository as well for reference, you can follow the progress here.
- Whereas i was able to see some errors on honeybadger for in development mode, i couldn't see them in production mode
With my project, I was able to see errors being reported in production mode.
However, with the app router setup, server errors are reported with very limited context for now. This is a limitation of the package at the moment and I will attempt to address it here.
Note: If you report them manually to Honeybadger, all the context should be available, with the source maps applied.
You should be able to try this in your projects pretty soon, as soon as the PR is merged!
Hey @mcAnastasiou, App Router is now supported with @honeybadger-io/nextjs@5.6.0!
Hey @mcAnastasiou, App Router is now supported with @honeybadger-io/nextjs@5.6.0!
Great news. Thank you very much. Is it fully supported? I mean the issue with limited context on server errors, is it fixed? I will check it locally and i will close the issue if everything works fine. Are there any changes in the documentation? Is there any example on how to use it with the app directory?
I mean the issue with limited context on server errors, is it fixed?
Unfortunately, no. This issue is tracked here.
Are there any changes in the documentation?
We haven't updated the documentation to display that App Router is supported, but you should be able to test it out by updating to the latest version of @honeybadger-io/nextjs
and then executing npx honeybadger-copy-config-files
.
This will create error.tsx
and global-error.tsx
files in the app
directory.
Is there any example on how to use it with the app directory?
The example app is not yet on Github, but will be soon :).