I use cygwin Xwin on Windows 8 with nodejs and I'm trying to npm link packages from my global repository, but I always get the following error
$ npm link lodash
unbuild lodash@2.1.0
npm ERR! Error: EPERM, symlink 'C:\Users\Mike\AppData\Roaming\npm\node_modules\lodash'
npm ERR! { [Error: EPERM, symlink 'C:\Users\Mike\AppData\Roaming\npm\node_modules\lodash']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Users\\Mike\\AppData\\Roaming\\npm\\node_modules\\lodash' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\nodeadmin.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "link" "lodash"
npm ERR! cwd C:\workspaces\caravanmap\server
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path C:\Users\Mike\AppData\Roaming\npm\node_modules\lodash
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, symlink 'C:\Users\Mike\AppData\Roaming\npm\node_modules\lodash'
I've tried every permission based thing I can think of to try and resolve this, including taking ownership of all the directories and chmod. I can't find a way to run my xterm as administrator which would seem to be able solve this - running the xterm.exe binary in the cygwin/bin directory doesn't run the xterm, instead I have to create a .bat file with a run xterm command.
On other computers I don't get the npm link error, or the problem with running xterm as an administrator. Could this be that something has changed in the latest version of cygwin? I had to rebuild my laptop after a hard-drive failure can't understand why this used to work but doesn't anymore. Has anyone seen this before?
many thanks in advance