Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:42:34+00:00 2026-06-03T09:42:34+00:00

My code is as follows var express = require(‘express’), everyauth = require(‘everyauth’), util =

  • 0

My code is as follows

var express = require('express'),
    everyauth = require('everyauth'),
  util = require('util'),
  Promise = everyauth.Promise,
  users = require('./users');

everyauth.twitter
  .consumerKey('')
  .consumerSecret('')
  .findOrCreateUser(function(session, accessToken, accessTokenSecret, twitterUserData) {
    console.log('pre promise');
    var promise = new Promise();
   users.findOrCreateByTwitterData(twitterUserData, promise);
    return promise;
  })
  .redirectPath('/');

It prints ‘pre promise’and then crash is as follows

pre promise

/.../node_modules/everyauth/lib/modules/everymodule.js:348
  throw err;
        ^
TypeError: undefined is not a function
    at Object._findOrCreateUser ( .../test.js:12:19)
    at Object.exec ( .../node_modules/everyauth/lib/step.js:47:21)
    at  .../node_modules/everyauth/lib/stepSequence.js:26:38
    at [object Object].fulfill ( .../node_modules/everyauth/lib/promise.js:42:25)
    at  .../node_modules/everyauth/lib/stepSequence.js:29:23
    at [object Object].fulfill ( .../node_modules/everyauth/lib/promise.js:42:25)
    at  .../node_modules/everyauth/lib/modules/twitter.js:16:15
    at passBackControl ( .../node_modules/everyauth/node_modules/oauth/lib/oauth.js:359:11)
    at IncomingMessage.<anonymous> ( .../node_modules/everyauth/node_modules/oauth/lib/oauth.js:378:9)
    at IncomingMessage.emit (events.js:88:20)

Users looks like:

var cradle = require('cradle');
var c = new cradle.Connection('...', 80, {
    auth:{username:'admin', password:'...'}
});
var users = c.database('users');

module.exports.findOrCreateByTwitterData = function(twitterUserData, promise) {
    console.log('finding');
    users.view('docs/twitterId', {key:twitterUserData.id_str}, function (err, doc) {
        if (err) {
            console.log('twitter error');
            return;
        }
        if (doc) {
            promise.fulfill(doc);
        }
        else {
            var doc = {

            };
        }
        c.database('users').save(doc, function (err, res) {
            if (err) {
                console.log('error with users');
                return;
            }
            promise.fulfill(doc);
        });
    });
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:42:35+00:00Added an answer on June 3, 2026 at 9:42 am

    I have the same issue with everyauth 0.2.32.
    Looks like everyauth.Promise is not being exported and the app crashes when you try to instantiate an ‘undefined’ class

    You can check if (Promise == ‘undefined’)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code is as follows: var mysql= require('mysql'); var client = mysql.createClient({ user: 'root',
I have a piece of javascript code as follows: var data = { ...
My code that I tried is as follows: var dataO = new Object(); dataO.numberId
I have code as follows: $(#item_select).change(function() { var params = $(#item_select option:selected).val(); $.post('/account/ar_form.php', {idata:
My code is as follows: <script> var i = 2; $(document).ready(function(){ $(#newrow).click(function(){ $(#maintable).append('<tr> <td><input
I have problem with xhr open() method. My code follows : var xmlhttp=false; if(!xmlhttp)
I've got code as follows: var smtpClient = new SmtpClient(my.mail.server); smtpClient.Send(mailmessage); however the send
I have some code as follows var MyObjectInstance = httpContext.Items[key] as MyObject What overhead
My code is as follows: var contactGroups = context.ContactGroups.Where(cg => cg.ContactID == contact.ID); var
I am programming a little timer. The code is as follows: var counter =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.