Warning for missing `console` syntax
See original GitHub issueFollowing this https://gitter.im/MoOx/phenomic?at=57b6202998125cfb657bc8d7
I am getting this warning.
Warning: %s Module build failed: Error: Expected `console` to be registered
at coreHighlight (/Users/moox/Sync/Development/phenomic/node_modules/lowlight/lib/core.js:354:15)
at Object.highlight (/Users/moox/Sync/Development/phenomic/node_modules/lowlight/lib/core.js:898:22)
at visitor (/Users/moox/Sync/Development/phenomic/node_modules/remark-highlight.js/dist/index.js:36:45)
at one (/Users/moox/Sync/Development/phenomic/node_modules/unist-util-visit/index.js:72:22)
at all (/Users/moox/Sync/Development/phenomic/node_modules/unist-util-visit/index.js:48:26)
at one (/Users/moox/Sync/Development/phenomic/node_modules/unist-util-visit/index.js:76:20)
at visit (/Users/moox/Sync/Development/phenomic/node_modules/unist-util-visit/index.js:82:5)
at /Users/moox/Sync/Development/phenomic/node_modules/remark-highlight.js/dist/index.js:42:45
at wrapped (/Users/moox/Sync/Development/phenomic/node_modules/trough/index.js:128:19)
at next (/Users/moox/Sync/Development/phenomic/node_modules/trough/index.js:81:24)
As you mentionned on the chat, this is likely due to “console” not being recognized. Ref https://github.com/isagalaev/highlight.js/issues/1126 (as it’s not in highlight.js as well for now).
I think one improvement is to make the warning message more clear. Something like
Lowlight expects "console" syntax language to be registered. Code can be highlighted with the appropriate syntax.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
no-console - ESLint - Pluggable JavaScript Linter
This rule disallows calls or assignments to methods of the console object. Examples of incorrect code for this rule: /* eslint no-console: "error"...
Read more >SyntaxError: missing ) after argument list - JavaScript | MDN
The JavaScript exception "missing ) after argument list" occurs when there is an error with how a function is called. This might be...
Read more >Hide errors and warnings from console - javascript
A dirty way to hide all Javascript console warnings is by overriding the console object's warn method: console.warn = () => {};.
Read more >Lint warnings about "Unexpected console statement no-console"
Current behavior: When I run yarn test in this project, it shows 25 lint warnings, all apparently complaining that console shouldn't be used ......
Read more >Problem with SP.PanoramicScreenshot via blueprint node ...
Problem with SP.PanoramicScreenshot via blueprint node "Execute Console Command" gives me warning: LogStereoPanorama: Warning: Missing GameMode ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

remark-highlight.js
4.0.1is out with this fix.Thanks!