I am trying to use the npm package from Meteor.js (release 0.6.6.3) with Meteor.require. However, it causes an error saying that it is requirenot defined. Why is this and how can we solve it?
mrt add npm
npm install github
packages.json
{
"github": "0.1.8"
}
github.js
var GITHUB = Meteor.require('github');
Mistake
ReferenceError: require is not defined
The npm package has lines like
var https = require('https')
var url = require('url')
var crypto = require('crypto')
Does the package code have to be manually edited for use Npm.require? Manually editing them eliminated errors.
However, there is a line:
module.exports = SOMETHING
How can we call moduleinside a meteor?
source
share