elm-repl找不到nodejs

按照此页面上的说明,我已经运行:

cabal update cabal install elm cabal install elm-server # (Optional) For testing your code in a browser. cabal install elm-repl # (Optional) For experimenting with elm in a REPL. cabal install elm-get # (Optional) For sharing/using elm libraries. 

不幸的是,当我运行elm-repl我得到它不知道nodejs在哪里:

 Elm REPL 0.3 <https://github.com/elm-lang/elm-repl#elm-repl> Type :help for help, :exit to exit The REPL relies on node.js to execute JavaScript code outside the browser. It appears that you do not have node.js installed though! You can install node.js from <http://nodejs.org/>. If it is already installed but has a different name, use the --interpreter flag. 

我怎么能指出elm-repl正确的方向。 其他3个scheme迄今为止工作良好。

如果安装了node.js,但是elm-repl找不到它,问题通常是无法findnode.js可执行文件。 确保可执行文件在你的PATH上,并检查它的名字是什么。 Node.js使用nodenodejs作为可执行文件的名称(我认为它是版本相关的),elm-repl期望它是node 。 如果您的PATH只有一个nodejs ,只需复制并重命名为node ,那么您应该很好。