New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0] clojure.ps1 is not on your PATH, please add it. #205
Comments
Nevermind, I was able to resolve this problem after reinstalling it via scoop twice. I am not sure why the clojure.ps1 files was installed to a weird place off the path but it was (and that's also why I couldn't find it). |
I encountered this problem too:
However, I can run |
@johnjelinek , can you check what the default shell is for the integrated terminal in your VS Code? If it is not "Powershell”, then try to switch to that and see if that helps. |
It is powershell.
…On Wed, Jun 19, 2019, 1:46 AM Peter Strömberg ***@***.***> wrote:
@johnjelinek <https://github.com/johnjelinek> , can you check what the
default shell is for the integrated terminal in your VS Code? If it is not
"Powershell”, then try to switch to that and see if that helps.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#205?email_source=notifications&email_token=AAGVJCRMNFPSTSY3ENMZ5LTP3HI4TA5CNFSM4HU3XNE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYA3XPA#issuecomment-503430076>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGVJCWIMLY7OQA5DDZEP43P3HI4TANCNFSM4HU3XNEQ>
.
|
Thanks. Let's see if we can figure this out... The code for finding the script is like so: /** Finds a file in PATH */
function findInPath(name: string) {
const paths = process.env.PATH.split(isWin ? ";" : ":");
for (let path of paths) {
let fullPath = path + (isWin ? "\\" : "/") + name;
if (fs.existsSync(fullPath))
return fullPath;
}
} So, if you inspect the |
same for |
Looks like it's installed as a Powershell Module: https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows#install |
I see the powershell function
|
@PEZ: any updates on this? |
I'm entirely sorry for my silence! For some reason I haven't gotten the notifications (or missed them). Maybe because the issue is closed. Reopening now. I will need help testing my attempts to fix this problem. I don't have Windows and I don't know anything at all about Powershell. |
Sure, I can help test, but also Microsoft has free vagrant images anyone can download for Windows 10: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ Powershell depends on a PATH env, just like bash. The issue here is, Clojure is installed as a Powershell Module instead of a binary like it is in bash. So, instead of seeing if clojure.ps1 is in the path, see if |
My old Mac can't handle emulating Windows, unfortunately. The problem here is a bit deeper than just figuring out if |
Ya, give that a shot. The Powershell Module does some shenanigans to make sure the Clojure command maps to the |
The current version of Calva expects a version of the CLI tools for windows that is associated to this ticket on Clojure's JIRA: https://clojure.atlassian.net/browse/TDEPS-67 ... the problem is that the alpha tools recommended for Windows on the Clojure website guide point to a totally different set of command line tools. I ran into this issue recently and found that Calva was able to connect to a REPL started with Powershell with the following workaround:
Once the nREPL server starts, you can use |
Hello @dfuenzalida ! Thanks for confirming that the problem stems from this change in how the I've been quite hard at work on this issue the last few days. From my and @johnjelinek's testing it seems I am about to fix it. Can you try this build and see if it jack-in works? calva-2.0.27-powershell-fix-5.zip Rename the extension from |
Thanks for helping me test that, @dfuenzalida . To support using calva-2.0.27-powershell-fix-6.zip Both the jack-in and the connect scenarios needs testing. |
Hi @PEZ , I had a look at the latest fix and it all worked fine for me. I tested the following scenarios:
|
Wow, thanks! I've been testing it myself, in all my various test projects and decided to release these fixes. Closing this issue now. Please join the #calva-dev slack channel, if you haven't @dfuenzalida. |
I have the Clojure alpha CLI tools installed on my windows 10 machine. From what I can tell there is no
clojure.ps1
file that gets installed with these tools (unless I am missing something which is very possible). There is aclojuretools.psm1
which I think is the entry point for this CLI along with another ps library file and a executable jar. (Not familiar with powershell). Is there something I am missing here? Also when I runCalva: open a Clojure repl
from inside of a clojure tools project I receive this errorCannot read property 'client' of undefined
Everything else seems to work aside from deploying a repl with the clojure CLI tools. I installed my ClojureTools using Scoop which puts it right on my path via shims so I do know that this is not the issue.
The text was updated successfully, but these errors were encountered: