Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

App directory support #14

Closed
mcAnastasiou opened this issue May 8, 2023 · 8 comments
Closed

App directory support #14

mcAnastasiou opened this issue May 8, 2023 · 8 comments
Assignees

Comments

@mcAnastasiou
Copy link

A few days ago, nextJS set app directory as stable version. Currently honeybadger is not working properly with this. Will you update it?

@subzero10
Copy link
Member

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.

@subzero10 subzero10 self-assigned this May 9, 2023
@subzero10
Copy link
Member

Link to documentation around the new app directory.

@mcAnastasiou
Copy link
Author

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.

  1. Source maps were not uploading for the app directory
  2. Whereas i was able to see some errors on honeybadger for in development mode, i couldn't see them in production mode

@subzero10
Copy link
Member

@mcAnastasiou I have some updates to share:

  1. 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.

  1. 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!

@subzero10
Copy link
Member

Hey @mcAnastasiou, App Router is now supported with @honeybadger-io/nextjs@5.6.0!

@mcAnastasiou
Copy link
Author

mcAnastasiou commented Jun 8, 2023

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?

@subzero10
Copy link
Member

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 :).

@subzero10
Copy link
Member

Here's the example app using App Router!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants