MEBonham

MEBonham

Hi, I just started trying to dive into Elixir today and I’m sure I’ll have lots of basic questions.

I’m on Windows 10 and primarily using the terminal inside VS Code (although I tried the PowerShell terminal and got a different error there).

When I try to use any Mix commands in my terminal, I’m getting:

mix : The term ‘mix’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.

I let Elixir add everything to my PATH that it wanted to add when I was installing it. When I open up my system environment variables and look under Path, I see “%USERPROFILE%.mix\escripts” is there.

Please help!

Showing Posts 1 to 3

WolfDan

WolfDan

When you open a normal cmd console can you use mix normally?

If so, close all vs code windows you have opened and run it again, normally when you add new env variables vscode does not recognize them until you close and open again it

NobbZ

NobbZ

This is true for any program. A process will never pick up changes in the environment after it has been started, unless it polls its parent for changes, which again has to poll its parent, etc…

Therefore, its a safe choice to restart any program that might rely on the changed environment after it has been altered.

Anyway, mix itself is not in %USERPROFILE%.mix\escripts, but whereever you installed elixir to. No clue what the default is. But assuming windows conventions it should be C:\Programs\elixir\bin or something like that (especially the Programs part I’m not sure about, as I’ve only ever seen its localized name, and I’m not using windows regularly).

MEBonham

MEBonham OP

Well I feel dumb for not thinking of that. That was indeed the (primary) problem.

When I closed and re-opened VSCode, the error changed to the error I was getting in PowerShell, i.e. that I wasn’t allowed to run scripts without changing my Execution Policy. I was able to figure out how to do that, but it seems like there’s no decent setting between “Restricted” (can’t run scripts at all) and “Bypass” (no protection at all), since Mix isn’t “digitally signed.” So if I want to be protected against running untrusted scripts, I’ll have to manually change to “Bypass” and back every time I want to use Mix. Let me know if I’m missing something, because this seems stupid.

Anyway, I got Mix to start a new project, so I can continue following the tutorial now. Thanks.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews