Silly noob import/export question

I’m using the structure from Meteor guides and I have this:



var GitHubApi = require('github');

var Github = new GitHubApi({
  // required
  version: "3.0.0",
  // optional
  debug: true,
  protocol: "https",
  host: "", // should be for GitHub
  timeout: 5000,
  headers: {
    "user-agent": "P" // GitHub is happy with a unique user agent

export default Github;

Then in registerApi.js I import it

import '../../api/github.js';

And just as a test in meteor shell I do:

> import Github from '/imports/api/github.js';
> Github
ReferenceError: Github is not defined

What am I doing wrong?

Long story short, you can’t call import from Meteor shell and have to use require. See [1.3.1] Strange import behavior

Thanks! I appreciate it.

Having some trouble calling it but at least it’s… requiring now.

When required how do you use the defined exports?


var a = require('something');