Nodejs和Coffeescript安装(Ubuntu 12.04)

编辑:我已经添加了一个答案,如何解决这个万一有人与它斗争。

我已经将我的笔记本电脑从Ubuntu 11升级到12.04,出于某种原因,coffeescript编译器停止工作。 我用它来进行Web开发,但我仍然是一个在linux环境下工作的新手。

基本上,当我尝试运行cake.coffeescript我得到以下内容:

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它会抛出一个错误:

 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造成的。 我试图谷歌的解决scheme,但没有任何帮助。 我认为这个问题是由于我已经包含在〜/ .bashrc文件的顶部的NODE_PATHvariables(我按照本教程安装了所有东西)。 任何帮助将非常感激,因为我即将完成一个项目的一部分,需要交付,但不能编译coffeescript文件。

谢谢

现在全部排序。 我不得不删除所有退出的文件夹以及包含npm,coffee-script和node的Ubuntu存储库中的所有文件,并从git安装所有东西。 一步一步安装:

 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 

这应该工作