I faced the issue when I was working under MagicMirror folder and then installing the 3rd party modules. I corrected it by going into /MagicMirror/Modules folder and then installing the module using the git command. Hope this helps