简体   繁体   中英

Leiningen only runs in one directory

I'm currently attempting to work through "Clojure for the Brave and True" ( in particular, trying to set it up ) and I'm running into some trouble. I'm on Windows 10 so I installed Leiningen according to the instructions on the website , but the lein commands only work on the Desktop where I installed it, not in the actual project folder which is located on the desktop (navigating to the actual folder does not let me run it; using lein run on the Desktop simply results in the error "No:main namespace specified in project.clj."

Have I done something wrong in installing leiningen?

You will need to edit your Path environment variable to add the folder where you installed the lein.bat file, or you could just provide the full path to that file instead of just lein when you're working in a different folder.

I would recommend creating a folder on your C: drive to put lein.bat in, and adding that folder to Path instead of desktop. I typically used to have C:\lein\ with lein.bat in that folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM