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

家住魔仙堡 提交于 2019-12-11 05:59:18

问题


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).


回答1:


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



来源:https://stackoverflow.com/questions/51620186/mix-exs-file-changes-syntaxerror-mix-exs65-unexpected-token-column-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!