I'm writing my own CLI node module 'npak' that is installed globally.
I need to find the absolute path of the local 'node_modules' folder of a project where the (the global) cli command was executed.
say the project looks like this:
/folder-three/ npak find-modules
^-- this should return absolute path of node-modules folder
There are some useful modules, like
find-node-modules, that can help you with such a task.