-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of undefined (reading 'nameState') After Installing @newrelic/next in Next.js Project #2880
Comments
Please review https://github.com/newrelic/node-newrelic?tab=readme-ov-file#nextjs-instrumentation. The |
I am aware of The command I am using to start the process is What should I refer in these docs that could help me with the problem? |
@gvatsov The |
I'm going to close this issue. We no longer support |
@bizob2828 is it too late to add a version 0.11.0 for @newrelic/next that has a console warning to switch to newrelic instead? I think it might save some folks time out there. A few of us were troubleshooting this thinking it was a configuration issue not a deprecation issue. |
@birdback we can deprecate the npm package which will give you a warning on install. |
In my Next.js project, the deployment pipeline consistently executes the command yarn add newrelic @newrelic/next -W. After a deployment on January 14, 2025, at 10:40 PM GMT+2, my application began experiencing the following error:
Expected Behavior
After executing the command yarn add newrelic @newrelic/next -W and deploying the application, the Next.js project should integrate seamlessly with New Relic's monitoring tools. Specifically, the application should function normally, rendering pages and handling requests without encountering the TypeError related to nameState.
Troubleshooting or NR Diag results
a. Did you run the Troubleshooting or NR Diag tool?
No
b. Any relevant log excerpts?
Note: All sensitive information has been scrubbed from the logs.
Steps to Reproduce
Sample Application:
No sample application provided.
Your Environment
Additional Context
This error occurs immediately after deploying the latest version with New Relic's @newrelic/next package integrated into the Next.js project. The TypeError prevents the application from rendering pages correctly, impacting user experience and monitoring capabilities provided by New Relic.
Previous deployments with the @newrelic/next package did not exhibit this issue. Attempting to remove the New Relic packages temporarily resolves the error, indicating a direct correlation between the package installation and the encountered issue.
The text was updated successfully, but these errors were encountered: