When compiling a bugged .ink file using npx inkjs-compiler, you only get a message: Error: Compilation failed.
I am using inkjs to create stories on my mobile phone using Termux and it would be super helpfull if compiler was able to output proper error mesages like in Inky.
That way when away from a windows machine I could easily continue to iterate on the story and keep writing & testing...
This is the last missing functionality that stops me from going fully writing stories on tablet/phone when in train, or just away from the main PC...
To Reproduce
run npx inkjs-compiler on an .ink file which has any errors, for example the one provided further down.
see that compiler will first output all of it's js script's code, and then show call stack with message:
Error: Compilation failed.
at get runtimeStory [as runtimeStory] (${project_root_path}\node_modules\inkjs\bin\inkjs-compiler.js:2:245878)
Expected behavior
It would be fantastic compiler didn't dump js scripts content on error & provided more precise error messages like Inky (for the broken .ink file mentioned further down):
Line 2: Failed to load: './IdontExist.ink'
Ink files
// including a non-existing .ink subfile
INCLUDE ./IdontExist.ink
//Start the story
->start_story
=== start_story ===
this is a test story with an error
+ [Finish the test]
->END
Environment
Node.js - v20.17.0
inkjs - v2.3.0
Android - Termux console, Windows, Linux, WSL, etc. (happens on all platforms)
Describe the bug
When compiling a bugged .ink file using
npx inkjs-compiler
, you only get a message:Error: Compilation failed.
I am using inkjs to create stories on my mobile phone using Termux and it would be super helpfull if compiler was able to output proper error mesages like in Inky. That way when away from a windows machine I could easily continue to iterate on the story and keep writing & testing...This is the last missing functionality that stops me from going fully writing stories on tablet/phone when in train, or just away from the main PC...
To Reproduce
npx inkjs-compiler
on an.ink
file which has any errors, for example the one provided further down.Expected behavior
It would be fantastic compiler didn't dump js scripts content on error & provided more precise error messages like Inky (for the broken
.ink
file mentioned further down):Ink files
Environment