简体   繁体   中英

Mix.exs file changes - (SyntaxError) mix.exs:65: unexpected token: “” (column 1, codepoint U+0000)

saving any changes made to mix.exs file on Mac OS High Sierra 10.13.6 results in null character at beginning of file.

I originally opened this against the intellij elixir plugin, but the problem is created from using ANY text editor (sublime, vim, intellij).

demo of issue: https://github.com/KronicDeth/intellij-elixir/issues/1165

What Mac setting is this? How do I fix?

** (SyntaxError) mix.exs:65: unexpected token: "" (column 1, codepoint U+0000) (elixir) lib/code.ex:629: Code.load_file/2 (mix) lib/mix/cli.ex:29: Mix.CLI.proceed/1 (elixir) lib/code.ex:677: Code.require_file/2

EDIT:

All this weirdness happens when editing code on a mac, and running it within the VM (linux).

Are you on Erlang 21? If so, try downgrading to Erlang 20. I've heard there are issues between that version and VirtualBox. A similar question: https://elixirforum.com/t/error-unexpected-token-column-1-codepoint-u-0000-when-making-file-changes-with-a-code-editor/15785/3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM