Rya

Rya

Setting up IDE to use nmake to compile elixir librairies through the ElixirLSP

Hello, I’ve encountered issues using Elixir on Windows 11. The issue is with with the mix commands. The problem arises in the context of a Phoenix framework project, but since the issue does not seem tied to Phoenix itself, I’ve choosen to post this thread in the Elixir forums.

Issue

Running the mix compile commands yields an error message suggesting to use the MVS community build tools to compile the bcrypt library. The compiler provides advice to open a command prompt with a specific batch file (vcvarsall.bat). This works to compile code, but as the Elixir LSP extension for VSCode does not run in this specific environement, i don’t have access to the extension, which is limiting productivity-wise.

Is this a known issue for windows users and are there any fixes ? (My linux distro was broken by a recent update I need a fallback solution in the meantime)

Thanks in advance.

Marked As Solved

cmo

cmo

You need to be in one of the developer command prompt/powershell consoles.

There are various posts around the web on how to do this, e.g. here and here.

This is what I have in my vscode config file:

  "terminal.integrated.defaultProfile.windows": "vsbuild_pwsh",
  "terminal.integrated.automationProfile.windows": {
    "path": "pwsh.exe"
  },
  "terminal.integrated.profiles.windows": {
    "vsbuild_pwsh": {
      "args": [
        "-NoExit",
        "-Command",
        "$vsPath = & \"${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe\" -products * -latest -property installationpath; Import-Module \"$vsPath/Common7/Tools/Microsoft.VisualStudio.DevShell.dll\"; Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation"
      ],
      "source": "PowerShell",
      "icon": "terminal-powershell"
    }

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement