The setImmediate function introduced in NodeJS v0.10.x to queue functions. It works like process.nextTick function but with a difference in functionality. Read JohnnyHK’s answer to figure out: http://stackoverflow.com/a/15349865/375966

Most of the time, by upgrading the NodeJS core to v0.10.x it can simply solve your problem.

tldr;

Upgrade your NodeJS to v0.10.x.