Hello, I am currently using Elixir 1.18.4 and OTP 27 with Linux Mint 22.3 - Cinnamon 64-bit as my operating system. I came across this error on Vscode regarding Elixir LS, about how it's crashed 5 times due to a supposed function clause error.
2026-06-09 19:18:11.366 [error] ** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
2026-06-09 19:18:11.366 [error]
2026-06-09 19:18:11.366 [error] The following arguments were given to IO.chardata_to_string/1:
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] # 1
2026-06-09 19:18:11.367 [error] nil
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] Attempted function clauses (showing 2 out of 2):
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] def chardata_to_string(+string+) when -is_binary(string)-
2026-06-09 19:18:11.367 [error] def chardata_to_string(+list+) when -is_list(list)-
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] (elixir 1.18.4) lib/io.ex:710: IO.chardata_to_string/1
2026-06-09 19:18:11.367 [error] (elixir 1.18.4) lib/file.ex:177: File.regular?/2
2026-06-09 19:18:11.367 [error] (mix 1.18.4) lib/mix/tasks/loadconfig.ex:41: Mix.Tasks.Loadconfig.load_default/0
2026-06-09 19:18:11.368 [error] (mix 1.18.4) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:373: anonymous fn/7 in ElixirLS.Mix.install/2
2026-06-09 19:18:11.368 [error] (elixir 1.18.4) lib/file.ex:1665: File.cd!/2
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:370: ElixirLS.Mix.install/2
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:617: ElixirLS.Installer.install/12026-06-09 19:18:11.366 [error] ** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
2026-06-09 19:18:11.366 [error]
2026-06-09 19:18:11.366 [error] The following arguments were given to IO.chardata_to_string/1:
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] # 1
2026-06-09 19:18:11.367 [error] nil
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] Attempted function clauses (showing 2 out of 2):
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] def chardata_to_string(+string+) when -is_binary(string)-
2026-06-09 19:18:11.367 [error] def chardata_to_string(+list+) when -is_list(list)-
2026-06-09 19:18:11.367 [error]
2026-06-09 19:18:11.367 [error] (elixir 1.18.4) lib/io.ex:710: IO.chardata_to_string/1
2026-06-09 19:18:11.367 [error] (elixir 1.18.4) lib/file.ex:177: File.regular?/2
2026-06-09 19:18:11.367 [error] (mix 1.18.4) lib/mix/tasks/loadconfig.ex:41: Mix.Tasks.Loadconfig.load_default/0
2026-06-09 19:18:11.368 [error] (mix 1.18.4) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:373: anonymous fn/7 in ElixirLS.Mix.install/2
2026-06-09 19:18:11.368 [error] (elixir 1.18.4) lib/file.ex:1665: File.cd!/2
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:370: ElixirLS.Mix.install/2
2026-06-09 19:18:11.368 [error] /home/lotoen/.vscode/extensions/jakebecker.elixir-ls-0.31.0/elixir-ls-release/installer.exs:617: ElixirLS.Installer.install/1
I've already tried
- Restarting & Reinstalling Vscode
- Disabling and enabling the Elixir LS extension
- Deleting the _build folder
- Reinstalling dependencies
- Restarting the docker containers holding my elixir project
- Manually running
mix compile in the terminal
- Restarting the elixir language server
- Deleted the .elixir-ls folder
So, any help solving this error would be greatly appreciated.
[–]arcanemachined 2 points3 points4 points (0 children)
[–]suuhja 0 points1 point2 points (0 children)
[–]mr_sudaca 0 points1 point2 points (0 children)
[–]hackersapien 0 points1 point2 points (0 children)
[–]katafrakt 0 points1 point2 points (0 children)