Error when compiling a language that requires another language
See original GitHub issueHow to reproduce
Create a language testa.js
/*
Language: testa
Requires: testb
*/
export default function(hljs) {
return {
name: 'testa'
};
}
that requires a language testb.js
/*
Language: testb
*/
export default function(hljs) {
return {
name: 'testb'
};
}
Then compile testa
node .\tools\build.js -n testa
You will receive the following messages on the terminal:
Starting build.
Finished build.
... testa requires testb
(node:3900) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'requires' of undefined
at filter (D:\Projekte\highlight.js_parser\highlight.js\tools\lib\dependencies.js:74:10)
at Object.buildBrowser [as build] (D:\Projekte\highlight.js_parser\highlight.js\tools\build_browser.js:25:15)
at async doTarget (D:\Projekte\highlight.js_parser\highlight.js\tools\build.js:87:3)
(node:3900) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3900) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Trying to use the languages in tools/developer.html
shows that the compilation indeed did not succeed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
configure error "A compiler with support for C++11 language ...
no configure: error: *** A compiler with support for C++11 language features is required. Here is the output from g++ --version : g++...
Read more >The 7 Most Common Types of Errors in Programming and ...
Experiencing different types of errors in programming is a huge part of the ... Some programming languages require a compilation step.
Read more >Interpreted vs Compiled Programming Languages: What's the ...
Compiled languages need a “build” step – they need to be manually compiled first. You need to “rebuild” the program every time you...
Read more >Configuring your compiler: Choosing a language standard
With Visual Studio, you will need to reselect your language standard every time you create a new project. To select a language standard,...
Read more >Difference between Compiled and Interpreted Language
A compiled language is a programming language that is generally ... 5, In this language, compilation errors prevent the code from compiling.
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
Stupid line endings. Can you make a PR? 😃
Can anyone else reproduce this? @allejo @egor-rogov Either of you on windows?