Why the fuck? Why the fucking module cannot be fucking required? Why all fucking advices on fucking internets doesn't help? How to fucking make npm install modules to the fucking where node will search for it while require? The fuck is this?
I'm probably have an answer to your question. Well, you see, I decided once to create my own new npm module. So I created a folder ~/tst/my-fucking-module, put package.js into that fucking directory, put there some code and then typed in console
~/tst/my-fucking-module$ npm install .
~/tst/my-fucking-module$ npm install . -g
~/tst/my-fucking-module$ sudo npm install .
~/tst/my-fucking-module$ sudo npm install -g .
~/tst/my-fucking-module$ sudo npm install -g --verbose .
~/tst/my-fucking-module$ sudo fuck you you fucking bitch fuck you fuck you fucking fuck fuck fuck fuck die moron I hate you so fucking much
with no luck. Whenever I tried to run node test.js it printed in console
Error: Cannot find module 'my-fucking-module'
Guess fucking what? The problem was because my console `pwd` was teh ~/tst/my-fucking-module
~/tst/my-fucking-module$ cd ..
~/tst$ npm install my-fucking-module
would work because some degenerate decided that if I cd'ed into directory that has 'package.js' file inside it, it would be COOL AND FUCKING FUNNNY LULZ KEKEKE to install all packages into ~/tst/my-fucking-module/node_modules instead of ~/node_modules and OFC "that stupid node" would not go to ~/tst/fucking-package-folder/node_modules to search for it because it wasn't written by morons!
Fuck that shit. Really. Fuck that fucking shit. Why would you ever need to install your fucking modules inside of the fucking package? Why? Add some shitty key for this you fucking moron! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fuck! Fukc...
FUCK. FUCK YOU, I'LL BECOME AN ALCOHOLIC BECAUSE OF SHIT LIKE THIS.
That's all folks.