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

rayex
When I compile hex package io_ansi_plus, I get error “Codepoint failed”. Why? and why are the “Got:” and “Hint:” codepoints identical? It...
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
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
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
ktayah
Environment Oban Pro: 1.7.6 Oban: 2.22.1 Issue When a sub-workflow built with Workflow.put_context/2 is attached to a parent via ...
New
hakarabakara1
I have three modules, a Business which is associated Tags and Categories though join tables business_tags and business_categories. I inte...
New
lunipaws
while setting up my development enviroment I encountered an issue that I just haven’t been able to resolve after running mix phx.gen.cer...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement