Closed SylvainBigonneau closed 9 years ago
Thanks for taking the time to submit this!
I think the require
line was left over from when I first forked this package, because I never do any sort of require in the app where I'm using it. Here's an example where Npm.require
isn't needed: http://meteorpad.com/pad/WbG4PtMsBZDuSartS/github-api%20test. In fact, if I try to use Npm.require
I get an error:
Exception while invoking method 'getFollowing' Error: Cannot find module 'github-api'
I'm trying to figure out what context the Npm.require
is needed in, since from the StackOverflow issue it appears necessary. Is there something I'm missing?
@bruz I encountered the same issue
'require' is not defined
when i tried to access github using this package.
After following the example you posted, I'm able to make use of this api. It'd help if you can update the readme, by removing the following line.
var GitHub = require("github");
Actually yes, it turns out the only problem was probably the presence of the require statement in the first place. I was not the person having the issue on StackOverflow so I cannot be sure he or she tried to just remove this statement. Anyway, I adapted my pull request according to @kalarani's input.
Perfect - thanks @BraveKenny!
Given this issue on StackOverflow, the package's description should be updated (on atmosphere as well) to correspond to the new way to add it and require it into your project.