Why there is no function fs.exists from Node.js on Ubuntu

I am migrating Node.js code from windows to Ubuntu 12.04, an error happens when running the code saying 'fs' has no method 'exists'. the code is like

var fs = require('fs');
fs.exists ...

I checked the doc from nodejs.org and did not found any instruction of API difference on different platforms. Did I missing anything of configuring Node.js on Ubuntu?

fs.exists was added in node 0.7.1. So if you are using node before that you cannot use that function. Check your node version using node -v to confirm this.