在cygwin xterm上执行npm链接时出现EPERM错误

我在Windows 8上使用cygwin Xwin与nodejs,我试图从我的全局资源库npm链接包,但我总是得到以下错误

$ 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' 

我已经尝试了所有基于权限的事情,我可以想办法解决这个问题,包括获取所有目录和chmod的所有权。 我无法find一种方式来运行我的xterm作为pipe理员似乎能够解决这个问题 – 在cygwin / bin目录中运行xterm.exe二进制文件不运行xterm,而是我必须创build一个.bat文件用一个运行xterm命令。

在其他计算机上,我没有得到npm链接错误,或者以pipe理员身份运行xterm的问题。 难道这是cygwin的最新版本中有所改变吗? 硬盘驱动器故障后,我不得不重build我的笔记本电脑不明白为什么这用于工作,但现在不再。 有没有人见过这个?

提前谢谢了

尝试在Cygwin中运行以下代码:

 chmod -R 0777 /c/Users/Mike/AppData/Roaming/npm-cache/ 

这在Cygwin 64位Windows 7上修复了这个错误。