I'm making a tiny tool which is coding in Node.js and it would create file symlink on both Windows and OSX. However I get stuck at how to create symlink on Windows.
First, I tried fs.symlink and junction option, but junction only works for directory on Windows.
Secondly, by referring to Git Bash Shell fails to create symbolic links, I tried to directly call cmd <<< mklink SOURCE TARGET by using of shelljs.exec, it never returned, node console hung.
Thirdly, I created a shell script named 'symlink.sh', invoked this script by child_process.spawn, I got Error: spawn ENOENT.
Now I've no idea, how to solve it? Thanks