和的NodeJS CoffeeScript的安装(Ubuntu的12.04)(Nodejs and

2019-07-29 08:09发布

编辑:我增加了关于如何解决这一问题,以防有人与它斗争的答案。

我已经升级,从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/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。 我想谷歌的解决方案,但没有任何帮助。 我认为这个问题是我已经列入到〜/ .bashrc文件的顶部NODE_PATH变量(我跟着这个教程安装一切)。 任何帮助将非常感激,因为我即将完成一个项目的一部分,需要把它在,但没有编制的CoffeeScript文件无法做到这一点。

谢谢

Answer 1:

现在所有排序。 我不得不从含故宫,咖啡脚本和节点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

这应该工作



文章来源: Nodejs and Coffeescript install (Ubuntu 12.04)