node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

same error as Error #391 #402

Closed matcabral closed 9 years ago

matcabral commented 9 years ago

gh --version

/usr/lib/node_modules/gh/lib/exec.js:21 exec = child_process.spawnSync(cmd, args, options); ^ TypeError: Object # has no method 'spawnSync' at Object.exports.spawnSync (/usr/lib/node_modules/gh/lib/exec.js:21:26) at Object.exports.getNodeModulesGlobalPath (/usr/lib/node_modules/gh/lib/configs.js:29:23) at Object.exports.run (/usr/lib/node_modules/gh/lib/cmd.js:216:17) at Object. (/usr/lib/node_modules/gh/bin/gh.js:20:26) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16)

node --version v0.10.36

gh is hub-linux-amd64-2.2.1.tar.gz

Any advice on how to fix this? Thanks, Regards,

matcabral commented 9 years ago

the actual version for gh:

gh@1.11.9 /lib/node_modules/gh ├── userhome@1.0.0 ├── truncate@1.0.5 ├── async@1.4.2 ├── open@0.0.5 ├── wordwrap@1.0.0 ├── colors@1.1.2 ├── nopt@3.0.3 (abbrev@1.0.7) ├── which@1.1.1 (is-absolute@0.1.7) ├── github@0.2.4 (mime@1.3.4) ├── update-notifier@0.5.0 (is-npm@1.0.0, string-length@1.0.1, chalk@1.1.1, semver-diff@2.0.0, repeating@1.1.3, configstore@1.2.1, latest-version@1.0.1) ├── handlebars@3.0.3 (optimist@0.6.1, source-map@0.1.43, uglify-js@2.3.6) ├── moment@2.10.6 ├── insight@0.5.3 (object-assign@2.1.1, async@0.9.2, lodash.debounce@3.1.1, chalk@1.1.1, os-name@1.0.3, tough-cookie@0.12.1, request@2.61.0, configstore@0.3.2) └── inquirer@0.8.5 (ansi-regex@1.1.1, figures@1.3.5, cli-width@1.0.1, through@2.3.8, readline2@0.1.1, chalk@1.1.1, lodash@3.10.1, rx@2.5.3)

henvic commented 9 years ago

We don't support anymore node 0.10.

If you can't upgrade to node 0.12, stick with gh v1.9.4. npm install gh@v1.9.4

PS: Are you using a node version manager and installed gh while on 0.12?

matcabral commented 9 years ago

Updating the version of node (node-v0.12.7) solved the issue. Thanks !!

henvic commented 9 years ago

Great. Let me know if you need anything else.