2012-05-09 60 views
2

编辑:我增加了关于如何解决这一问题,以防有人与它斗争的答案。和的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建立它引发我一个错误:

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/[email protected]: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/[email protected]: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。我试图谷歌解决方案,但没有任何帮助。我认为这个问题是我已经列入到〜/ .bashrc文件的顶部NODE_PATH变量(我跟着this教程安装一切)。任何帮助都会得到真正的赞赏,因为我即将完成项目的一部分并需要交付,但不能编译coffeescript文件。

感谢

+2

或接听并接受你的答案,以防有人进入同样的麻烦。 – mreq

回答

8

现在所有排序。我不得不从含故宫,咖啡脚本和节点Ubuntu软件库中删除所有文件夹退出,以及一切和安装一切从饭桶。 一步一步的安装:

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 

这应该工作