通过在Vagrant上运行precision32 Ubuntu Box的
Windows 7机器上安装Bower时,我一直遇到这个错误.我尝试了每个命令的组合,总是得到相同或非常相似的错误
@H_502_10@在全球安装sudo,没有sudo等等
... npm ERR! Error: EPERM,open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js' npm ERR! { [Error: EPERM,open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js'] npm ERR! errno: 50,npm ERR! code: 'EPERM',npm ERR! path: '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Linux 3.2.0-23-generic-pae npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "bower" "--no-bin-links" npm ERR! cwd /home/vagrant npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! path /home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js npm ERR! code EPERM npm ERR! errno 50 npm ERR! stack Error: EPERM,open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js' ...
编辑:以下我的答案请注意使用Windows时的文件目录文件大小限制(260个字符我相信)
我不得不直接在我的c:/驱动器上安装一个文件夹,以获得这个限制,因为某些包最终有嵌套依赖关系导致超出该限制.我的问题是无耻的