webstorm报错node:no such file coffee plugin
发布于 12 年前 作者 goooice 8166 次浏览 最后一次编辑是 8 年前

刚刚接触coffee方言,刚好webstorm对这个有支持的插件就想学习一下,在命令行下完全无问题,但是当利用idea的时候却是小有不爽,一番gg之后发现一个解决方案,不过我发现我的环境变量本身就是这么设置的,所以不解~ 0.0 http://devnet.jetbrains.net/thread/434628

翻了一下他自带的文档:

  1. For compiling CoffeeScript to JavaScript, you need some JavaScript engine to be installed. The easiest way is to use Node.js, which should be downloaded and installed on your machine. There are two ways of using Node.js:

    • Use NodeJS repository plugin. It should be installed and enabled.
    • Define Node.js as an external tool, as described in the section Configuring third-party tools. This approach is helpful, when you need facilities that are missing in the plugin, for example, the possibility to pass certain parameters as wildcards.

发现还有第二种解决方案,于是弃用第一种,选用扩展工具的方式实现。扩展方案依旧

最终解决方案

> vim /usr/local/bin/coffee

加入node的绝对路径才可以运行,webstorm的task中没有系统环境变量,不知道为啥,猜测是app沙箱搞的。求解~

#!/usr/bin/env node
#!/usr/bin/env /usr/local/bin/node
1 回复

我升级到 webstorm 7 后file watchers 编译 less文件时出了同样的错误信息

搜索了一下,下面两篇文章,说是 编码的问题,于是用dos2unix. 结果还是出错. http://blog.csdn.net/greenqingqingws/article/details/12321481 http://stackoverflow.com/questions/18492897/env-node-r-no-such-file-or-directory-with-cordova-cli

还是你的方法好使.

不知道是不是webstorm 7 的bug,webstorm 6时一切正常.

回到顶部