当我运行yo hubot
时,出现以下错误
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "hubot"
"hubot-scripts" "hubot-diagnostics" "hubot-help" "hubot-heroku-keepalive" "hubot-google-images"
"hubot-google-translate" "hubot-pugme" "hubot-maps" "hubot-redis-brain"
"hubot-rules" "hubot-shipit" "--save"
为什么会这样?我试过运行sudo npm install hubot-rules
但它似乎不起作用。请帮忙!
答案 0 :(得分:1)
原来你需要拥有~/.npm
目录。您可以运行此命令来执行此操作:
$ sudo chown -R $(whoami) "$HOME/.npm"