The full text of the error is below:
$ roc build
── NOT END OF FILE in .../Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk/main.roc ─
I expected to reach the end of the file, but got stuck here:
32│ main_for_host! = |raw_args|
This occurred after upgrading the compiler version and basic-cli
platform version and then running roc format --migrate
I have no idea what it means, but the language server is red-underlining a single character at a consistent arbitrary distance from the start of the file. If I delete text above the error error location, the error location remains at the same distance from the start of the file. The text it is pointing at seems to be completely irrelevant. The code will not compile at all in this state.
This is saying your dependency is invalid
It could definitely be more clear...
Do you have packages in your header?
Yes, but after removing them the same error is thrown
I just created a new project with just a main.roc
file with this code:
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
main! = \_args ->
Stdout.line! "Hello, World!"
And this throws the same error.
I tried it again with the same (latest) compiler version and reverted the basic-cli
package version to 0.18.0
, and builds with no issues. Seems like the issue must be with the basic-cli
version.
Here is the link to the working release:
https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br
https://github.com/roc-lang/basic-cli/releases/tag/0.19.0
Try a more recent version of basic cli
Sorry if I wasn't clear, but 0.19.0
is causing the build failure. 0.18.0
works for me.
Which version of roc are you using? This one should be compatible with 0.19.0 https://github.com/roc-lang/roc/releases/tag/0.0.0-alpha2-rolling
We are right now releasing a whole lot of changes, we'll be finished in about 24 hours
Hmmm, it's possible I messed up when upgrading and was using the old compiler version.
Your language server may have also been using an older version, in vscode there is a setting in the extension that points to the path of the roc_language_server binary.
Last updated: Jul 06 2025 at 12:14 UTC