Title: TypeError: Cannot call method 'clone' of undefined · Issue #91 · nodegit/nodegit · GitHub
Open Graph Title: TypeError: Cannot call method 'clone' of undefined · Issue #91 · nodegit/nodegit
X Title: TypeError: Cannot call method 'clone' of undefined · Issue #91 · nodegit/nodegit
Description: Been following the examples from the readme and seems like there's something wrong: Here's my example code: var git = require('nodegit'); var path = '/tmp/'; git.Repo.clone("https://github.com/nodegit/nodegit.git", path, null, function(e...
Open Graph Description: Been following the examples from the readme and seems like there's something wrong: Here's my example code: var git = require('nodegit'); var path = '/tmp/'; git.Repo.clone("https://github.com/node...
X Description: Been following the examples from the readme and seems like there's something wrong: Here's my example code: var git = require('nodegit'); var path = '/tmp/'; git.Repo.clone(...
Opengraph URL: https://github.com/nodegit/nodegit/issues/91
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypeError: Cannot call method 'clone' of undefined","articleBody":"Been following the examples from the readme and seems like there's something wrong:\n\nHere's my example code:\n\n``` javascript\nvar git = require('nodegit');\n\nvar path = '/tmp/';\n\ngit.Repo.clone(\"https://github.com/nodegit/nodegit.git\", path, null, function(error, repo) {\n if (error) throw error;\n\n repo.getCommit('59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5', function(error, commit) {\n if (error) throw error;\n\n commit.getEntry('README.md', function(error, entry) {\n if (error) throw error;\n\n entry.getBlob(function(error, blob) {\n if (error) throw error;\n\n console.log(entry.name(), entry.sha(), blob.size() + 'b');\n console.log('========================================================\\n\\n');\n var firstTenLines = blob.toString().split('\\n').slice(0, 10).join('\\n');\n console.log(firstTenLines);\n console.log('...');\n });\n });\n });\n});\n```\n\n``` shell\ngit.Repo.clone(\"https://github.com/nodegit/nodegit.git\", path, null, function(\n ^\nTypeError: Cannot call method 'clone' of undefined\n at Object.\u003canonymous\u003e (/Users/attila/Projects/node-testing/git-example.js:5:10)\n at Module._compile (module.js:456:26)\n at Object.Module._extensions..js (module.js:474:10)\n at Module.load (module.js:356:32)\n at Function.Module._load (module.js:312:12)\n at Function.Module.runMain (module.js:497:10)\n at startup (node.js:119:16)\n at node.js:901:3\n```\n\nIt is also not entirely clear how to try cloning a repository based on the [docs](http://www.nodegit.org/nodegit/#Repo). Could you add an example please that shows how to require the module properly and then how to clone a repo? Thank you.\n\nUsing the latest node as of today: v0.10.18\n","author":{"url":"https://github.com/attilagyorffy","@type":"Person","name":"attilagyorffy"},"datePublished":"2013-09-08T14:05:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/91/nodegit/issues/91"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:573e8a95-4ed5-e8e8-ba77-2536f27b8319 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB6C:277ED1:4071979:544D0EB:6A5D2661 |
| html-safe-nonce | b14639ae003858fa4a5d1ceae1abe5b98c98c0cede4ad811caa0bf7811d30cd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjZDOjI3N0VEMTo0MDcxOTc5OjU0NEQwRUI6NkE1RDI2NjEiLCJ2aXNpdG9yX2lkIjoiOTA3NzU1ODMxOTg0Njg2MDM4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6b737a2fb999c2ffacb35b173c950ddb798109782bdac238146304ad0de441c |
| hovercard-subject-tag | issue:19161151 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/91/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bd49f394de3d26f30d8139ee634d4c18c118c345c97a27ffb819018b30360501/nodegit/nodegit/issues/91 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bd49f394de3d26f30d8139ee634d4c18c118c345c97a27ffb819018b30360501/nodegit/nodegit/issues/91 |
| og:image:alt | Been following the examples from the readme and seems like there's something wrong: Here's my example code: var git = require('nodegit'); var path = '/tmp/'; git.Repo.clone("https://github.com/node... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | attilagyorffy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width