Tag Archives: testem

Phantomjs and testem

I ran into this problem with Testem not picking up phantomjs from the command line to run the tests.

My testem.json

{
“launch_in_dev”: [
“phantomjs”
]

}

The problem

npm folder where the installs occur for globals was still owned by root.

If I tried to run phantomjs from the command line it would throw up a stack trace about ownership.

The solution Chown

sudo chown -R the location where the global node modules are installed by npm.

OSX

sudo chown -R YOURUSER:YOURGROUP /usr/local/lib/node_modules/

Linux

sudo chown -R YOURUSER:YOURGROUP /usr/lib/node_modules/