0

我正在尝试在 Windows 机器上安装咖啡脚本,但无法运行咖啡命令。这是我在控制台上尝试 coffee -v 的结果:

    Program 'coffee' failed to execute: No application is associated with the specified  file for this operation
    At line:1 char:7
    + coffee <<<<  -v.
    At line:1 char:1
    +  <<<< coffee -v
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

我安装了节点并尝试通过

npm install -g coffee-script@1.1.1 

npm install -g http://github.com/jashkenas/coffee-script/tarball/master
4

1 回答 1

0

Powershell 无法像 unix shell 那样从脚本的第一行确定解释器。解决方案是自己指定 Node 应用程序:

node ./node_modules/path/to/coffee
于 2014-03-21T00:33:43.447 回答