PhantomJS Colors Module "Unable to find variable: process"

I installed the colors module using:

npm install colors

      

I also copied "colors.js-master" to my desktop. Whenever I try to "require" "colors" or even point to an index / colors file on my desktop, it says:

ReferenceError: Can't find variable: process
:26

      

Here's the current code I'm using that points to the one on my desktop:

var colors = require('C:/Users/KidsRoom/Desktop/colors/lib/index');
console.log("test".yellow);

      

I also tried to globally set colors with:

npm install -g colors

      

And then I tried to do:

var colors = require('colors');
console.log("test".yellow)

      

+3


source to share





All Articles