node-gh的问题,通常可能是node.js安装

时间:2014-09-27 05:14:01

标签: node.js github-api

我是node.js开发的新手。我最近安装了npm / node.js并安装了node-gh应用程序。

当我加载它时,我收到以下错误:

gh [success] Authentication succeed.
gh [success] Writing GH config data: /Users/esteban/.gh.json

fs.js:665
  return binding.readdir(pathModule._makeLong(path));
                 ^
Error: ENOENT, no such file or directory '/usr/local/Cellar/node/0.10.32/lib/node_modules'
    at Object.fs.readdirSync (fs.js:665:18)
    at Object.exports.getPlugins (/usr/local/lib/node_modules/gh/lib/base.js:250:18)
    at exports.checkVersion (/usr/local/lib/node_modules/gh/lib/base.js:176:27)
    at /usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:551:21
    at /usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:227:13
    at iterate (/usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:134:13)
    at /usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:145:25
    at /usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:229:17
    at /usr/local/lib/node_modules/gh/node_modules/async/lib/async.js:556:34
    at /usr/local/lib/node_modules/gh/lib/git.js:119:9
```

我的路径是否存在问题?谢谢。

编辑:/usr/local/lib/node_modules/gh/lib/base.js中的代码246 - 260:

exports.getPlugins = function() {
    var nodeModulesPath = exports.getNodeModulesGlobalPath(),
        plugins;

    plugins = fs.readdirSync(nodeModulesPath).filter(function(plugin) {
        return plugin.substring(0, 3) === 'gh-';
    });

    return plugins;
};

exports.getPluginBasename = function(plugin) {
    return plugin && plugin.replace('gh-', '');
};

0 个答案:

没有答案