1

我从 npm 安装了 Yeoman,但尝试时出现此错误yo webapp。它似乎与grunt-contrib-compass包有关,但我不知道发生了什么,错误EPERM?错误行都在最后,我在前面的行中包含了上下文,也许它们提供了一些信息。我不明白这个错误,任何人都可以解释它的含义吗?是权限问题吗?我试过了,sudo但我读过不推荐,Yeoman 告诉我我不应该用sudo.

671 silly gunzTarPerm extractEntry package.json
672 silly gunzTarPerm extractEntry README.md
673 silly gunzTarPerm extractEntry Gruntfile.js
674 silly gunzTarPerm extractEntry .jshintrc
675 silly gunzTarPerm extractEntry AUTHORS
676 silly gunzTarPerm extractEntry CHANGELOG
677 silly gunzTarPerm extractEntry CONTRIBUTING.md
678 silly gunzTarPerm extractEntry LICENSE-MIT
679 silly gunzTarPerm extractEntry tasks/compass.js
680 silly gunzTarPerm extractEntry tasks/lib/compass.js
681 silly lockFile bc64b16b-690-0-042454059002920985-package tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
682 silly lockFile bc64b16b-690-0-042454059002920985-package tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
683 silly lockFile e0825942-690-0-042454059002920985-tmp-tgz tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/tmp.tgz
684 silly lockFile e0825942-690-0-042454059002920985-tmp-tgz tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/tmp.tgz
685 verbose tar pack [ '/home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz',
685 verbose tar pack   '/home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package' ]
686 verbose tarball /home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz
687 verbose folder /home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
688 silly lockFile bc64b16b-690-0-042454059002920985-package tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
689 verbose lock tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package /home/elclanrs/.npm/bc64b16b-690-0-042454059002920985-package.lock
690 silly lockFile 12072454-ontrib-compass-0-2-0-package-tgz tar:///home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz
691 verbose lock tar:///home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz /home/elclanrs/.npm/12072454-ontrib-compass-0-2-0-package-tgz.lock
692 silly lockFile bc64b16b-690-0-042454059002920985-package tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
693 silly lockFile bc64b16b-690-0-042454059002920985-package tar:///home/elclanrs/tmp/npm-18745/1374459607690-0.042454059002920985/package
694 silly lockFile 12072454-ontrib-compass-0-2-0-package-tgz tar:///home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz
695 silly lockFile 12072454-ontrib-compass-0-2-0-package-tgz tar:///home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz
696 silly lockFile 07d965f9--grunt-contrib-compass-0-2-0-tgz https://registry.npmjs.org/grunt-contrib-compass/-/grunt-contrib-compass-0.2.0.tgz
697 silly lockFile 07d965f9--grunt-contrib-compass-0-2-0-tgz https://registry.npmjs.org/grunt-contrib-compass/-/grunt-contrib-compass-0.2.0.tgz
698 silly lockFile 91530c32-grunt-contrib-compass-0-2-0 grunt-contrib-compass@0.2.0
699 silly lockFile 91530c32-grunt-contrib-compass-0-2-0 grunt-contrib-compass@0.2.0
700 silly lockFile f2e16aab-grunt-contrib-compass-0-2-0 grunt-contrib-compass@~0.2.0
701 silly lockFile f2e16aab-grunt-contrib-compass-0-2-0 grunt-contrib-compass@~0.2.0
702 error Error: EPERM, chown '/home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz'
702 error  { [Error: EPERM, chown '/home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz']
702 error   errno: 50,
702 error   code: 'EPERM',
702 error   path: '/home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz' }
703 error Please try running this command again as root/Administrator.
704 error System Linux 3.9.10elclanrs
705 error command "/usr/bin/node" "/usr/bin/npm" "install"
706 error cwd /home/elclanrs/Desktop/webapp
707 error node -v v0.10.13
708 error npm -v 1.3.2
709 error path /home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz
710 error code EPERM
711 error errno 50
712 error stack Error: EPERM, chown '/home/elclanrs/.npm/grunt-contrib-compass/0.2.0/package.tgz'
713 verbose exit [ 50, true ]
4

1 回答 1

12

这很可能是一个临时的 npm 错误。运行npm cache clean并重新开始 如果这没有帮助,请确保您拥有该$HOME/.npm目录并更改所有者以防万一您不运行chown -R $USER ~/.npm.

于 2013-07-22T11:16:51.627 回答