Lotoen

Lotoen

FunctionClauseError Elixir LS Crash

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

So, any help solving this error would be greatly appreciated.

First Post!

christhekeele

christhekeele

Welcome to the forum!

This stacktrace tells me that your mix.exs is setting :config_path to nil, or :config_path is not set. More recent versions of Elixir check for the nil case but 1.18.4 does not. I would check your mix.exs config for issues.

Where Next?

Popular in Troubleshooting Top

ChrisAmelia
Currently reading and experimenting through, which is in 1.6 Chapter 7: Sign up | Phoenix Tutorial (Phoenix 1.6) | Softcover.io In regar...
New
rathoud96
Environment Elixir 1.18.3-otp-27 / OTP 27.3.4 Oban 2.20.2 Phoenix 1.7.x db_connection 2.8.1 / Postgrex 0.21.1 Infrastructure: Google Cl...
New
Lotoen
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 er...
New
tellemiller
We recently started running Oban with Oban Web on PostgreSQL (AWS RDS gp3) and noticed our oban_jobs buffer cache hit ratio sitting at 65...
New
AstraLuma
Experienced programmer writer her first Elixir, and maybe bit off more than she can chew? I’m trying to start two GenServers, where the ...
New
rayex
For hex package islands_score the source @spec for function format/2 is as such: @spec format(t, keyword) :: :ok Why does it show on 4 ...
New
anotherpit
A graft inside another graft causes Oban.Pro.Workflow.status to recurse forever. oban_pro 1.7.5 defmodule App.NestedGraftRepro.Test do ...
New
bugnano
Hello everyone. I’m the author of GitHub - bugnano/wtransport-elixir: Elixir bindings for the WTransport WebTransport library · GitHub ,...
New
Lotoen
Hi, I’m on Linux Mint 22.3 - Cinnamon 64-bit, and I encountered an error when trying to build an elixir phoenix container 577.1 Reading...
New
ndan
Oban.Pro.Migration.up(version: "1.7.0", only: :indexes) fails on partitioned oban_jobs table when upgrading Oban Pro from 1.6 to 1.7 def...
New

Other popular topics Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement