Fork me on GitHub
#clj-on-windows
<
2023-05-29
>
mandudeman16:05:43

How am I going to resolve the issue below? PS C:\Users\PC Workstation> clj clj : The 'clj' command was found in the module 'ClojureTools', but the module could not be loaded. For more information, run 'Import-Module ClojureTools'. At line:1 char:1 + clj + ~ + CategoryInfo : ObjectNotFound: (clj:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

mandudeman16:05:00

PS C:\Users\PC Workstation> .\build-clojure-msi.ps1 .\build-clojure-msi.ps1 : The term '.\build-clojure-msi.ps1' 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. At line:1 char:1 + .\build-clojure-msi.ps1 + ~ + CategoryInfo : ObjectNotFound: (.\build-clojure-msi.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

borkdude16:05:40

Can you specify how you got here?

mandudeman00:05:47

I used Ubuntu as my OS in my laptop and there was no problem installing leiningen and Clojure on it. But this time around, I tried to install Clojure in Windows 10 in my PC. After installing Java and other prequisites, I installed Clojure by following the instruction outlined in this site: https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows After, successfully following the directions, I tried to run clj or clojure in the Windows PowerShell but I got this error: PS C:\Users\PC Workstation> clojure clojure : The 'clojure' command was found in the module 'ClojureTools', but the module could not be loaded. For more information, run 'Import-Module ClojureTools'. At line:1 char:1 + clojure + ~ + CategoryInfo : ObjectNotFound: (clojure:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

mandudeman04:05:31

I am ok now as I followed the recommendations given by Sean Corfield. I use WSL2 and from their installed Java, Leiningen and Clojure along with the other prerequisites.

borkdude07:05:13

@U03JN22B596 I was asking because I saw "clj-msi" and the wiki does not seem to mention clj-msi, so I wondered how that could be

borkdude07:05:32

If you want to have a thing that works in Windows without powershell, you can try scoop-clojure + clj-deps

lread11:05:01

@U04V15CAJ there is also this thread where I recommended using clj-msi as an option: https://clojurians.slack.com/archives/C053AK3F9/p1685368690591729

borkdude11:05:50

It seems like @U03JN22B596 was trying to build clj-msi rather than just downloading + installing it

mandudeman11:05:40

When I followed the instructions, I was really intending to install clj on Windows. After successfully doing what was written on the site, I tried to run the command clj and clojure. Both threw the same error.

mandudeman11:05:42

After reading Sean Corfield's response on my query, I realized that he was right, I could use WSL to run Clojure on Windows 10. Thus, I tried to install WSL2 and then Java and the other requirements to install Clojure. After heeding what Sean suggested, I was able to run Clojure without problems. Thanks a lot again!

lread11:05:20

Ok, glad you have a solution that works for you!

mandudeman11:05:39

Yes. Thanks a lot!

borkdude11:05:49

That clj-msi site should probably emphasize that you should not run those build instructions, unless you are developing clj-msi

lread11:05:23

Yeah, true, that would be helpful to newcomers for sure.

chucklehead18:06:53

Sorry, have been travelling/hiking without a computer recently and obviously missed out on some things. I just updated the docs to separate the build instructions and emphasize installation. Any other feedback is appreciated.

🙏 4
lread20:06:14

Awesome-sauce @U015879P2F8, changes to README look great!