Not really a flow, sorry about that, because you need to change directory to the userDir which may be different on different installations.
However, when you are in the right folder, you can issue the following command to find out how many node.js packages you have installed. Including all of the sub-dependencies for every package (e.g. everything!).
npm ls | sed '/deduped$/d' | wc -l
You do need sed
and wc
though so this will only really work from Linux command lines (including the Windows WSL) - maybe Mac too?