Phantomjs cannot be started and local install

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s