Yes, there's a way to skip the error.
1) Open the file "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-install-checks\index.js"
2) Comment out this code at the very bottom:
if (!er && s.isDirectory()) {
var e = new Error(folder + ': Appears to be a git repo or submodule.')
e.path = folder
e.code = 'EISGIT'
return cb(e)
}
Done.
Background
From another dev long frustrated by this error; none of the suggested solutions work in my case because of constraints from various systems.
Suggestion: NPM works with symlinks, so create symlink of module from node_modules, to your library repo folder.
Problem: Then Watchman doesn't scan the JS files within.
Suggestion: Do "npm publish" and "npm install". Every. Single. Time.
Problem: Terrible for quick development tests/cycles, and spams the npm directory with hundreds of never-to-be-used versions.
Suggestion: Use Watchman Links (WML). (i.e. directory auto-copying on file-change)
Problem: Have to have a background program running all the time, for all the included repos on my machine. Also, it means I can't open the files directly in the node_modules folder to make quick changes; instead I have to go to the library's source repo every time. That's fine usually, but sometimes it's nice to make changes in the program repo, and have it reflected in the library repo, in addition to vice-versa.
My solution
So yeah, with the above change, I can use a hard-link clone of the library directory and avoid the problems above.
I use this to create the directory-level hard-link clone: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#hardlinkclones
The one problem with this approach is that I have to re-run the hard-link clone whenever I add or remove files in the library. But at least I don't have to do anything when changes are made within existing files. (which is by far more painful)