-
Notifications
You must be signed in to change notification settings - Fork 108
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
Issue: SeriesRegistry, AST & Undefined Errors in Highcharts Integration (Next.js >15 & React >19) #505
Comments
Hi @rickybharti, thanks for reporting this! We're working to put this right. Could you confirm if this workaround works fine for you? Also, check the related thread. Kind Regards! |
Im seeing the same "TypeError: Cannot read properties of undefined (reading 'SeriesRegistry')" in a react 18.3 environment after updating to
I notice the tests in this repo are still following the old pattern of initializing the modules with |
Hi @aParadowski! I agree that the tests should follow the new module importing statements described here. I'll leave this thread open until this is fixed. To be sure, what environment do you use for testing? Jest runs tests in the node environment, which may affect the imports as the browser API reference is missing. Have you tested it in a browser-like environment, like Regards! |
Hey @KamilKubik , thanks for the quick reply! We are using the
with the The complete jest config is as follows:
Other charts are working fine ( |
@aParadowski thanks for the clarification! I've performed testing using two approaches (both seem to work fine):
For both approaches, I used the
Despite the above working, I see the same error running tests in the node environment (missing the browser API). Could you test it, and see if you managed to render the chart properly? If that's not helpful, can you share your test file so I can have the complete reproducible implementation? Regards! |
@KamilKubik sorry for not responding sooner, been catching up on other work! I took a step back and tested your
|
@aParadowski as I'm not seeing your chart options could you also narrow the debugging by:
If the above, simple chart configuration works fine for you, we should consider checking any other imports/specific options in your imported, external files. Also, I'd like to highly encourage you to take a look at the open discussion under the related thread. It seems there are a few suggestions that can fix it in your environment. I think you should at least try:
Looking forward to your response, |
@KamilKubik it looks like import order was the source of my issue. The I see in the linked comment it mentions it is best practice to import the |
@aParadowski I'm glad you made it work! Since we are working on a stable solution, let me leave this thread open until everything is handled properly so the specific docs can be shared. Answering your question, you should follow the mentioned pattern to ensure the Nevertheless, @bre1470, is there anything that can be added to this statement, considering the case? |
Description:
DEMO LINK : https://replit.com/@rickybharti01/RundownLimeMoto
While attempting to integrate Highcharts and Highcharts React Official into a Next.js 15.1.2 app, the following errors occur:
1. SeriesRegistry TypeError:
• Errors like Cannot read properties of undefined (reading 'SeriesRegistry') imply an issue with Highcharts module initialization, potentially due to version mismatches or missing configurations.
2. AST Undefined Error:
• Cannot read properties of undefined (reading 'AST') is another sign of improper module integration or compatibility issues
3. Build and ESLint Errors:
• During npm run build, the build process fails with:
• TypeError: Cannot read properties of undefined (reading 'SeriesRegistry').
• ESLint error: Cannot serialize key "parse" in parser: Function values are not supported.
Steps to Reproduce:
1. Install Dependencies:
• Run: npm install highcharts highcharts-react-official.
2. Run Development Server:
• Command: npm run dev.
• Errors occur when accessing the app at the local server address (e.g., http://localhost:3000).
3. Build for Production:
• Command: npm run build.
• Fails with TypeError: Cannot read properties of undefined (reading 'SeriesRegistry').
Observations:

![Uploading Screenshot 2024-12-20 at 3.21.43 PM.png…]()
• Highcharts Version: 12.1.0
• Highcharts React Official Version: 3.2.1
• Next.js: 15.1.2
• React: >19
• Multiple ports (3000, 3001, 3002) were tried without success.
The text was updated successfully, but these errors were encountered: