-
Notifications
You must be signed in to change notification settings - Fork 171
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
Async filter in view panel throws unreturned Promise warning #576
Comments
What's the version of installed highlight.js in your lockfile? I think you somehow got highlight.js v10 beta installed, which changes how "text" is parsed:
|
This comment has been minimized.
This comment has been minimized.
@Risker I've just checked and have 9.18.1 in both main repo and theme. |
This comment has been minimized.
This comment has been minimized.
It's a bit weird to debug this since it's hard to reproduce without code :) Are you by any chance using code blocks in docs files? E.g.
That should be incorrect, and should use Anyhow, that error reporting was introduced in highlight.js#2236 and released in v9.17. Before that it seems that lib did not complain about missing languages. So I'm guessing you need to update the languages in your projects. Regarding the Promise warning, I don't think this is related to the highlight.js issue? In any case, a reproducible case would be appreciated. |
The warning appears in the console when I navigate to components page. It doesn't appear on docs page nor on components "preview" page. So my guess is that it's probably linked with the component panels (html, view, context, info or notes). I started removing panels one after the other. After removing the "context" panel, the following warning disappeared:
If the panel is present but the component doesn't have any context, no warning is thrown. I've overrided the template to see which line was causing the warning, it's this one (or this one if not a variant). Removing the After removing the "views" panel, the other warning disappeared:
The error is probably caused by this line where it fallback to the value of I could trace the issue back to this line and though the issue was caused by @allmarkedup/fang that doesn't support the So I renamed all the my templates from Edit: I've just seen this MR https://github.com/frctl/fractal/pull/579/files 😅 |
Hi @LeBenLeBen, without my PR, fang is still at version 1.0.0 which doesn't support the |
@LeBenLeBen i can't test this theory out myself since i'm unable to reproduce the promise warning, but looking at our implementation of the |
Sorry, I forgot to mention the repository where this happens is public: https://github.com/liip/styleguide I tried to add the returns but it didn't solve the issue. I just saw that we actually have this in the config file: /**
* Prevent Bluebird warnings like "a promise was created in a handler but was not returned from it"
* caused by Nunjucks from polluting the console
*/
const bluebird = require('bluebird');
bluebird.config({
warnings: false,
}); I've quickly checked Bluebird and it still seems to be the right way. It's weird it doesn't apply to this specific case. I think I must have found this in #235 at the time. |
The following warning:
Has been fixed by #579 |
Using the latest version, I can see the following warning popping in the console when the server starts and when it reloads after file changes:
I’ve see this issue in two different projects.
I’ll try to investigate to see if I can find the origin of it.
The text was updated successfully, but these errors were encountered: