Do not put phantomjs in your package.json of your node project.
When you call npm install it will install the package locally in your project’s node_modules folder.
When you try and run grunt test you will get an error message similar to this.
phantomjs cannot be started.
Fixing local phantomjs install
rm node_modules
npm install
Phantomjs must be installed globally.
npm install -g phantomjs