提问人:user51 提问时间:4/12/2023 更新时间:11/2/2023 访问量:352
Calva 错误“运行 'lein with-profile +test,+dev classpath' 时 LSP 类路径查找失败。
Calva Error "LSP classpath lookup failed when running `lein with-profile +test,+dev classpath`. "
问:
我想使用 vs code 作为 clojure 的开发环境。
我正在 vs code 中打开留言簿项目。
一旦在vs代码中打开项目,就会弹出错误。
LSP classpath lookup failed when running `lein with-profile +test,+dev classpath`. Some features may not work properly if ignored. Error: Cannot run program "lein" (in directory "/Users/rnatarajan/Documents/Coding/others/clj-web-dev/c01/guestbook"): error=2, No such file or directory Choose an option:
我还在 VS Code 输出中获得了以下详细信息 -
Calva is utilizing cider-nrepl and clojure-lsp to create this VS Code experience.
nREPL dependencies configured:
nrepl: 1.0.0
cider-nrepl: 0.28.5
cider/piggieback: 0.5.3
clojure-lsp version configured: latest
If you are new to Calva, please see: https://calva.io/getting-started/
And please consider the command: **Calva: Fire up the Getting Started REPL**
Calva version used: v2.0.350
答:
0赞
Jethro Larson
6/22/2023
#1
您可能只需要安装 clojure。请按照以下说明操作:https://clojure.org/guides/install_clojure
评论
0赞
user51
6/22/2023
我已经安装了 clojure
0赞
Orodiel
11/2/2023
#2
我偶然发现了一个类似的错误,但根本原因不同。
在您的情况下,VS Code 似乎无法启动(这是指定项目的生成工具)。确保 Leiningen 已安装并添加到 .lein
PATH
P.S. 当 clojure-lsp 尝试计算已放弃的项目的类路径时,我遇到了类似的问题,同时(由于从迁移到 )。必须创建一个配置文件并指定适当的“类路径扫描”选项。project.clj
deps.edn
lein
clojure tools
评论