[Working on Windows, with node 0.10.5]
I'm trying to build something simple with the formidable module for node. I installed it globally -
npm install -g formidable
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable
npm WARN engine formidable@1.0.13: wanted: {"node":"<0.9.0"} (current:{"node":"v0.10.5","npm":"1.2.18"})
formidable@1.0.13 C:\Users\me\AppData\Roaming\npm\node_modules\formidable
Now, the module was installed correctly to the aforementioned directory, but node won't recognize it:
D:\Work\Node\Test4>node index.js
module.js:340
throw err;
^
Error: Cannot find module 'formidable'
Blah blah blah
Now, my questions are:
In the past, when I've had problems like this it was related to NODE_PATH. My guess is your path C:\Users\me\AppData\Roaming\npm\node_modules\formidable isn't in NODE_PATH so even though it's installed "globally" your install can't see it.
See the official documentation about loading from the global folders and also checking the value of NODE_PATH by using the SET command on Windows command line.