When I encountered a similar issue with jspm, the root cause was actually related to how nodejs child_process.exec was invoking the git command.
The problem lied in the way child_process.exec was executing:
C:\Windows\system32\cmd.exe /s /c "git clone --depth=1 github.com/jspm/registry.git .
It turned out that cmd.exe was automatically running commands set in the registry beforehand. In my scenario, this included a command that altered the working directory, thereby overriding the cwd value.
To address this, check your registry settings at:
- HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
- HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
If there is a command present to modify the working folder's drive, it could be causing the error mentioned above.
In addition:
If you set your working folder as c:\ and run the following nodejs code:
var exec = require('child_process').exec;
exec('dir', { cwd: 'C:/windows/fonts' }, function(error, stdout, stderr) {
console.log('stdout: ' + stdout);
});
If the contents of the fonts folder are not displayed, the issue may be linked to child_process.exec in node.