[Solved] Patch upgrade -> broke my Twitter functionality

when i did the patch upgrade, i saw that twitter-config-ui package was added (i am using Blaze, fwiw). i also saw that our functionality to post an item in our app to Twitter also broke.

this line exists in our server code:

let client = new Twitter(options);

in, that line runs fine. it does not after the upgrade:

Exception while invoking method 'v1/postNewsItemTweet' TypeError: Twitter is not a function

i’m using Webstorm, and i see that when i go to its reference, it’s resolves differently with the 2 versions.

when it works (, it picks up Twitter from:


when it doesn’t work (, it picks up Twitter from:


we’re using this package:

can anyone explain what happened and how i can going again w/ i don’t know if i need to import Twitter from somewhere specific, if i need to completely redo how we tweet from the app, or something else.

fwiw, i also tried a full upgrade to v1.4.3.2 and behaviour is the same as i describe above.

ok i solved it.

i ditched the lablancas package and used the twitter npm package directly. i imported the package like this:

let Twitter = require('twitter');

and used it like this:

let postAsync = Meteor.wrapAsync(function(client, path, params, callback) {
	client.post(path, params, callback);

let client = new Twitter(options);

postAsync(client, endpoint, status, function(error, tweet, response) {
   // stuff

i also upgraded to latest Meteor, v1.4.3.2.