我已在~/.local
本地安装了npm
现在,我想在本地安装中全局安装grunt-cli,但我有这个输出:
npm ERR! Linux 3.19.0-18-generic
npm ERR! argv "/home/etud/(my name)/.local/usr/bin/node" "/home/etud/(my name)/.local/bin/npm" "install" "-g" "grunt-cli"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! path /home/etud/(my name)/.npm/grunt-cli/0.1.13/package/package.json.ee5c5aa03b9d2c7367d767e1d6e17af3
npm ERR! code Unknown system error -121
npm ERR! errno -121
npm ERR! syscall chown
npm ERR! Unknown system error -121: Unknown system error -121, chown '/home/etud/(my name)/.npm/grunt-cli/0.1.13/package/package.json.ee5c5aa03b9d2c7367d767e1d6e17af3'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/etud/(my name)/npm-debug.log
我已经完成了:
$> npm config set -g user=`whoami`
并将其放入~/.npmrc
:
root = /home/(my name)/.local/lib/node_modules
binroot = /home/(my name)/.local/bin
manroot = /home/(my name).local/share/man
有什么想法吗?
修改 我在我的大学机器上正在研究nfs系统。由于用户地图的问题,我似乎无法调用chown命令。
有没有办法让npm跳过任何chown?