Calva 错误“运行 `lein with-profile +test,+dev classpath` 时,LSP 类路径查找失败。”

问题描述 投票:0回答:2

我想使用 VS Code 作为 clojure 的开发环境。

我正在 VS Code 中打开 guestbook 项目。

在 VS Code 中打开项目后,我会弹出错误消息。

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 代码输出中获得以下详细信息 -

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
clojure leiningen vscode-calva
2个回答
0
投票

您可能只需要安装 clojure。请按照此处的说明进行操作: https://clojure.org/guides/install_clojure


0
投票

我偶然发现了一个类似的错误,但根本原因不同。 在您的情况下,VS Code 似乎无法启动

lein
(这是指定项目的构建工具)。确保 Leiningen 已安装并添加到
PATH

附注当 clojure-lsp 尝试计算同时放弃

project.clj
deps.edn
的项目的类路径时,我遇到了类似的问题(由于从
lein
迁移到
clojure tools
)。必须创建一个配置文件并指定适当的 'classpath scan' 选项

© www.soinside.com 2019 - 2024. All rights reserved.