I have a new user on Windows who just installed th...
# general
m
I have a new user on Windows who just installed the pulumi CLI. When they run pulumi preview on a dotnet stack, they get an error that says "error: could not find 'dotnet' on the $PATH: exec: "dotnet": executable file not found in %PATH%" and error: failed to load language plugin dotnet: could not read plugin [C:\Program Files (x86)\Pulumi\pulumi-language-dotnet.exe] stdout: EOF. I haven't run into that before. If they run "dotnet" at the command prompt, it works. Anyone else run into this?
f
1. have they installed the dotnet sdk? sounds like they have but checking 2. have they added
%USERPROFILE%\.dotnet\tools
to their %PATH%
3. once adding that path, restart any cmd prompts they have open
4. note that most pulumi examples reference dotnet 6.0; if they have downloaded anything else e.g. 8.0+ don't forget to update the project's
csproj
to reflect that
m
Thanks, we'll check those.
f
np - lemme know how it goes; I just went through this ~month ago and it's not perfect, even on Windows.
m
He has %USERPROFILE%\.dotnet\tools in his path. And the pulumi project is .net6. I'm going to have him check if he has .net 6 installed....
👍 1
b
Craig, jumping in here since its easier than email through Zendesk- maybe we are missing the 64bit variety of
dotnet
which should be at
C:\Program Files\dotnet
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.401-windows-x64-installer
m
Thanks for the help! It's very odd. I have both .net 6 and .net 8 installed. I'm starting to think this maybe related with another tool. We use k8sLens to manage our clusters and the connection to the cluster. k8sLens has an integrated terminal where commands get executed using the kubernetes context. With MacOS and Ubuntu, we can run pulumi up/preview commands with no issues. For some reason, the same pulumi commands fail on Windows inside the k8sLens terminal. But, they work in a standard command window. I think this is an issue with k8sLens. I have opened a ticket with them. If we come up with a solution, I'll post back here.
👍 1
Not getting very far with the k8sLens people. Is there anything "special" about how pulumi uses environment variables. For example, I'm wondering if something in the pulumi process gets started as a sub-process and that subprocess does not have access to the environment variables. Grasping at straws here....
b
I dont believe so, the pulumi CLI is just a regular go executable, and would pick up its environment from the shell
is k8slense running that shell in a WPA2 process or something similar?
m
Let me ask. I'm not sure.
@billions-river-87988, can you give me some context regarding your question about WPA2?
b
sometimes people run it in a WPA2 (linux on windows) shell, just making sure that wasn't the case. A setup like that would have no access to the installed Pulumi on windows- would have to install pulumi in the WPA2 environment
m
I think of WPA2 as a WIFI standard? Did you mean WSL?
b
er, yes, sorry. Why did i type WPA2? lol
😄 1
m
No worries. Too many acronyms to keep track of. As far as I know, it isn't running in WSL.