apt-get install -g grunt grunt-cli 缺少模块

apt-get install -g grunt grunt-cli missing modules

我正在使用 Ubuntu 14.04 服务器并尝试使用以下命令安装 g运行t & g运行t-cli:

npm install -g grunt grunt-cli

一切正常,没有收到任何错误。但是当我 运行 标准 g运行t 命令时,我收到这个错误:

module.js:338
throw err;
      ^
Error: Cannot find module 'eventemitter2'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/var/www/html/unsplit/node_modules/grunt/lib/grunt/event.js:13:21)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at gRequire (/var/www/html/unsplit/node_modules/grunt/lib/grunt.js:23:24)
at Object.<anonymous>  (/var/www/html/unsplit/node_modules/grunt/lib/grunt.js:35:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:45:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3`

什么会导致这种情况发生?

出于某种运行ge 的原因,有一次我运行: npm remove -g grunt grunt-cli

并重新运行: npm install -g grunt grunt-cli

一切正常!