Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coffee script path.exists deprecated notice from node.js

  • OSX 10.6
  • CoffeeScript 1.2.0
  • node.js v0.7.7-pre

I am seeing a deprecation notice every time I run the coffee command. The notice is this:

path.exists is deprecated. It is now called `fs.exists`.

I know that this is happening because node.js deprecated path.exists. See

https://github.com/joyent/node/pull/2587

I would think there would be a lot of info about this but all I can see is some indirect reference relating to a more serious issue saying it's not going to be 'fixed':

https://github.com/jashkenas/coffee-script/issues/2113

Am I the only one having this problem? Does anyone have a suggestion on how I can make this go away?

like image 967
Mark Fraser Avatar asked Mar 26 '12 23:03

Mark Fraser


People also ask

Should you use CoffeeScript?

CoffeeScript is something that makes even good JavaScript code better. CoffeeScript compiled code can do everything that natively written JavaScript code can, only the code produced by using CoffeeScript is way shorter, and much easier to read.

Is CoffeeScript better than JavaScript?

Easy Maintenance and Readability: It becomes easy to maintain programs written in CoffeeScript.It provides the concept of aliases for mostly operators that makes the code more readable.


1 Answers

https://github.com/jashkenas/coffee-script/blob/master/lib/coffee-script/command.js#L323

There are references to path.exists in the coffeescript source code.

Note that that in node 0.6 (the current stable version) fs.exists is null so it's difficult to cleanly upgrade this.

We have an issue where the same source code doesn't work in both 0.6 and 0.7.

I would assume that we wait for 0.8 and then someone will upgrade coffeescript to use fs.exists and deprecate 0.6 support

like image 197
Raynos Avatar answered Oct 06 '22 16:10

Raynos