ClosureScript&NodeJS:错误:No * print

编程入门 行业动态 更新时间:2024-10-11 19:15:11
ClosureScript&NodeJS:错误:No * print-fn * fn设置为评估环境(ClosureScript & NodeJS: Error: No *print-fn* fn set for evaluation environment)

我跟着“你好世界!” 这两个指南中的NodeJS示例

https://github.com/clojure/clojurescript/wiki/Quick-Start#running-clojurescript-on-nodejs http://mmcgrana.github.io/2011/09/clojurescript-nodejs.html

并为每个我得到这个错误

Error: No *print-fn* fn set for evaluation environment

我错过了一个步骤? 这似乎是一个相当基本的问题......有谁知道print-fn在哪里设置?

I have followed the "hello world!" examples for NodeJS on both these guides

https://github.com/clojure/clojurescript/wiki/Quick-Start#running-clojurescript-on-nodejs http://mmcgrana.github.io/2011/09/clojurescript-nodejs.html

and for each I get this error

Error: No *print-fn* fn set for evaluation environment

Have I missed a step? This seems like a fairly basic problem ... does anyone know where print-fn is set?

最满意答案

你可以说

(enable-console-print!)

使用console.log进行打印。

在引擎盖下, enable-console-print! 设置*print-newline*和*print-fn* 。 这是r2156 的来源 。

You can say

(enable-console-print!)

to print using console.log.

Under the hood, enable-console-print! sets *print-newline* and *print-fn*. Here's the source as of r2156.

更多推荐

本文发布于:2023-07-27 15:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1292332.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   ClosureScript   NodeJS   print

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!