问题描述
编辑:我已经添加了如何解决此问题的答案,以防有人挣扎。
Ubuntu 11到12.04和某些原因coffeescript编译器停止工作。
I have upgraded my laptop from Ubuntu 11 to 12.04 and for some reason the coffeescript compiler stopped working. I use it for web development, but I'm still a newbie working in a linux environment.
基本上当我尝试运行cake.coffeescript时,我得到以下结果:
Basically when I try to run cake.coffeescript I get the following:
path.existsSync is deprecated. It is now called `fs.existsSync`.
Cakefile defines the following tasks:
cake doc # generate documentation for *.coffee files
cake doc_copy # copy documentation to gh-pages branch
cake build # generate unified JavaScript file for whole Hallo
cake min # minify the generated JavaScript file
cake bam # build and minify Hallo
所以在某种意义上它可以工作,但每当我尝试运行cake.coffeescript build它会给我一个错误:
So in a sense it works, but whenever I try running cake.coffeescript build it throws me an error:
path.existsSync is deprecated. It is now called `fs.existsSync`.
Executing coffee -o examples -j hallo.js -c `find src -type f -name '*.coffee'`
{ [Error: Command failed:
node.js:249
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function.<anonymous> (module.js:381:11)
at Object.<anonymous> (/home/ignas/bin/coffee@1.3.1:4:21)
at Module._compile (module.js:444:26)
at Object..js (module.js:462:10)
at Module.load (module.js:351:32)
at Function._load (module.js:309:12)
at module.js:482:10
at EventEmitter._tickCallback (node.js:238:11)
] killed: false, code: 1, signal: null }
node.js:249
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function.<anonymous> (module.js:381:11)
at Object.<anonymous> (/home/ignas/bin/coffee@1.3.1:4:21)
at Module._compile (module.js:444:26)
at Object..js (module.js:462:10)
at Module.load (module.js:351:32)
at Function._load (module.js:309:12)
at module.js:482:10
at EventEmitter._tickCallback (node.js:238:11)
由nodejs。我试图google的解决方案,但没有什么帮助。我认为问题是与NODE_PATH变量,我已经包括到〜/ .bashrc文件的顶部(我跟随教程安装一切)。任何帮助将非常感激,因为我要完成一个项目的一部分,需要交付,但不能编译coffeescript文件。
I guess this is caused by nodejs. I tried to google for a solution, but nothing helped. I think the issue is with the NODE_PATH variable which I have included to the top of ~/.bashrc file (I followed this tutorial to install everything). Any help would be really appreciated, because I'm about to finish a part of a project and need to hand it in, but can't do it without compiling the coffeescript files.
感谢
推荐答案
现在全部排序。作为一切从ubuntu仓库包含npm,咖啡脚本和节点和安装一切从git。
一步一步安装:
All sorted now. I had to delete all the exiting folders as well as everything from the ubuntu repositories containing the npm, coffee-script and node and install everything from git.Step by step installation:
1. clone https://github.com/joyent/node.git
2. git checkout v0.6.17 //current stable at my time
3. cd node && ./configure && make && make install
4. curl http://npmjs.org/install.sh | sudo sh
5. download coffeescript from git and do sudo bin/cake install
6. sudo npm install coffee-script -g
这应该适用
这篇关于Nodejs和Coffeescript安装(Ubuntu 12.04)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!