Describe the issue in as much detail as possible. Please remove the sections below if the issue is obvious enough and doesn’t require extra details.
Missing Dependencies :
chartjs-adapter-moment
[wp-content/plugins/hivepress/node_modules/chartjs-adapter-moment/dist/chartjs-adapter-moment.min.js]
chartjs (missing), moment
Steps to reproduce
List the steps to reproduce the issue.
-) Install Debugger plugin like query monitor for easier to debug
-) Go to homepage, click the scripts tab in query monitor
Actual result
Describe the actual result.
Expected result
Describe the expected result.
Extra details
Add a link to your site, screenshots or any other details that may help us pinpoint the issue.
Please send a screenshot of the plugins you are using. Also, please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users.
We checked this issue from our side, and it seems okay. On our end, we couldn’t reproduce the issue, and the error doesn’t show up in the console. Also, please note that we couldn’t confirm this issue last year either, so it’s not a bug for now.
Please provide more details regarding this issue (e.g., your actions step by step with screenshots, screencast, etc.). This will help us to reproduce and resolve the issue faster.
Just check this file /wp-content/plugins/hivepress/includes/configs/scripts.php (line 69), you will see ‘chartjs’ and ‘chartjs-adapter-moment’ have a different scope, thus it complain chartjs missing on frontned :
@ihor could you please sometimes do a random check on andrii’s response. I read most of his response is just ignoring user submitted problems/inputs without even doing real checking.
While it’s not a solution, apparently moments.js has been deprecated since 2020, and newer/better versions now exist.
Why Is Moment.js Deprecated?
Moment.js was a go-to solution for years because it made working with dates and times straightforward. However, it has some drawbacks that led to its deprecation in 2020:
Large Size:
At around 16KB (minified and gzipped), moment.js adds unnecessary weight to projects, slowing down page load times—especially critical for mobile users.
Mutable Design:
Moment.js lets you change date objects directly (e.g., moment().add(1, ‘day’) modifies the original object). This can lead to tricky bugs, as changes might ripple through your code unexpectedly.
Confusing API:
Some parts of moment.js are inconsistent or hard to use, like its handling of time zones and locales, which can trip up developers.
Better Options Exist:
Newer libraries have popped up that solve these problems with smaller, cleaner, and more modern approaches.
The moment.js team recognized these issues and decided to step back, pointing users toward better alternatives.
Recommended Alternatives
Instead of moment.js, the community and the moment.js team recommend these modern libraries:
Thanks for the details. As I clarified in my previous reply, we were unable to reproduce this issue locally. If possible, please send temporary WP access to support@hivepress.io with details for reproducing this issue, and we’ll check it (please send only the link, without login and password). You can create a temporary access link using this plugin Temporary Login Without Password – WordPress plugin | WordPress.org.
In your script ‘chartjs’ only loaded at backend, but ‘chartjs_adapter_moment’ require ‘chartjs’ in the frontend. Thats why there’s this error.
You dont need to reproduce, just read the code I sent you. Even 5 years old will understand this logic.
@ihor HivePress is an incredibly well-designed platform, and it’s clear you’ve put a lot of thoughtful effort into building something exceptional. However, to truly reach its full potential, it needs to be supported by a team that shares your level of commitment and drive. Without that shared dedication, even the best product can struggle to grow.
Thanks for your feedback, we’ll try to improve the quality of technical support.
Regarding the issue, if there’s no JS error in the console and this is just a Query Monitor warning, please ignore it until this is fixed. We set dependencies this way on purpose, this is a bit hacky way to prevent the script from loading without duplicating code.
For example, the Marketplace and Statistics extensions just add scope to the chart script without redefining the script and there’s no need to do this for Moment.js adapter since it already has all the scopes and starts loading because the chart script starts loading on the front end. We’ll try to do this in a more elegant way but this warning message shouldn’t cause any functional issues.