I realised that when I did a global installation of a node.js module (with the -g flag) node couldn't use that module unless I wrote the entire path.
I mean, this doesn't work if the module has been globally installed:
cheerio = require('cheerio'),
I have to write that:
cheerio = require('/usr/lib/node_modules/cheerio'),
How can I say to node that it has to look for the modules in the right path?
Thank you.