我正在尝试在Windows机器上安装coffeescript,但无法运行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
我安装了节点并尝试通过
安装coffeescriptnpm install -g coffee-script@1.1.1
以及
npm install -g http://github.com/jashkenas/coffee-script/tarball/master
答案 0 :(得分:0)
Powershell无法像unix shell那样从脚本的顶行确定解释器。解决方案是自己指定Node应用程序:
node ./node_modules/path/to/coffee