我有一个Clojure/ClojureScript项目,我可以在本地构建这个项目。该项目使用以下命令构建:
Pedros-MacBook-Air:balance pedro$ shadow-cljs watch app
shadow-cljs - config: /Users/pedro/projects/balance/shadow-cljs.edn
NPM dependency "highlight.js" has installed version "^9.16.2"
"11.1.0" was required by jar:file:/Users/pedro/.m2/repository/superstructor/re-highlight/1.1.0/re-highlight-1.1.0.jar!/deps.cljs
shadow-cljs - HTTP server available at http://localhost:3005
shadow-cljs - server version: 2.15.3 running at http://localhost:9630
shadow-cljs - nREPL server started on port 8230
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (1155 files, 3 compiled, 4 warnings, 10.88s)好的。它起作用了!
此外,我可以使用苹果酒没有项目。在不得不用y回答以下问题之后
Are you sure you want to run `cider-jack-in' without a Clojure project? (y or n) y我可以运行苹果酒,我有REPL的能力。好的。
所以,shadow-cljs和苹果酒都可以工作,但却是分开的。现在,我想让两个人一起跑!
然而,在上述成功构建的项目中,我不能使用苹果酒jack-in或cider-connect.
我的第一次尝试只是简单地将Emacs移动到项目目录并执行返回的cider-jack-in:

迷你缓冲区执行而不是允许我键入shadow-cljs watch app命令。I甚至不能引入空白空间。
如果我只是插入第一个想要的单词shadow-cljs,Emacs就会返回
用户错误: npx阴影-cljs可执行文件不在您的“exec-path”上。
,我必须突出显示,无论特定的cider-jack-in使用什么,都会检索到相同的错误消息。cider-jack-in和cider-jack-in-cljs都检索相同的错误消息。
我不知道该如何解决这个问题。为什么我连打字都不自由?
我的第二次尝试是尝试cider connect。关于host和port的信息,我使用了前面提供的“构建数据”:
shadow-cljs - HTTP server available at http://localhost:3005
shadow-cljs - server version: 2.15.3 running at http://localhost:9630
shadow-cljs - nREPL server started on port 8230首先,迷你缓冲区请求Host:,我的答复是:
http://localhost然后是Port:,我的回答是:
8320我得到了:
nrepl-connect: [nREPL] Direct connection to http://localhost:8230 failed; try setting ‘nrepl-use-ssh-fallback-for-remote-hosts’ to t之后,我尝试通过eval-expression (以M :为界)对下面的s-表达式进行了评估:
(setq nrepl-use-ssh-fallback-for-remote-hosts t) 但是,这还不够。Emacs返回:
nrepl--ssh-tunnel-connect: [nREPL] SSH port forwarding failed. Check the ’*nrepl-tunnel projects/balance:localhost*<2>’ buffer如果我将缓冲区切换到*nrepl-tunnel projects/balance:localhost*<2>,这就是我所拥有的:
OpenSSH_8.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/pedro/.ssh/config
debug1: /Users/pedro/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to http port 22.
ssh: Could not resolve hostname http: nodename nor servname provided, or not known
Process nrepl-tunnel exited abnormally with code 255我用的是macOS 12.5在MacBook Air M1上。this a possible是解决方案吗?
我怎么才能解决这个问题?
谢谢
发布于 2022-08-22 13:56:11
您正在尝试将ClojureScript项目作为Clojure项目运行。您应该使用cider-jack-in-cljs代替。当提示选择shadow-cljs作为命令使用时,shadow表示ClojureScript REPL类型,app用于影子cljs构建。
https://stackoverflow.com/questions/73439419
复制相似问题