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 8812257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:33:53+00:00 2026-06-14T03:33:53+00:00

I received this error: /home/user/node_modules/ldapjs/lib/server.js:65 throw new TypeError(‘Invalid argument type: ‘ + typeof (argv[i]));

  • 0

I received this error:

/home/user/node_modules/ldapjs/lib/server.js:65
throw new TypeError('Invalid argument type: ' + typeof (argv[i]));
        ^
TypeError: Invalid argument type: undefined
at mergeFunctionArgs (/home/user/node_modules/ldapjs/lib/server.js:65:13)
at Server._mount (/home/user/node_modules/ldapjs/lib/server.js:814:35)
at Server.add (/home/user/node_modules/ldapjs/lib/server.js:500:15)
at Object.<anonymous> (/home/user/workspace/ldap/ldap.js:34:8)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)

when attempting to do the tests on ldapjs guide.

This error pretty much blocks on doing further testing since the service won’t start.

  • 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-14T03:33:54+00:00Added an answer on June 14, 2026 at 3:33 am

    You are passing pre to ldapjs before it has been assigned the array of functions (I.E. it is undefined at the time). Variable and functions declarations are hoisted to the top, but assignments are not.

    Move this

    133. var pre = [authorize, loadPasswdFile];
    

    To the top, or at least before you pass it to ldapjs.

    The assignment is currently happening on line 133, but you are already passing it on line 34:

    34. server.add('ou=users, o=myhost', pre, function(req, res, next) 
    

    Btw, you should be able to see better where errors originate from by setting this at the start of the code:

    Error.stackTraceLimit = Infinity;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I received this error on following code.Is this + sign is not available in
I received >>> THIS <<< error log from a client. I replaced the app
By definition I had to post this question. I received the error on this
I keep getting this error: Warning: mysql_query() [function.mysql-query]: Access denied for user 'mcabinet'@'localhost' (using
I receive this error when I click on the section of my Tab-Bar application
I'm having a problem where I receive this error: Exception in thread main java.lang.NullPointerException
I received this reply on the Live555-mailing list: FEC is not needed for UDP.
I use thinking sphinx in my project on refinery cms. And I received this
I have a Person Class and based on some help I received in this
I've received Mixed responses on this depending what walk-through I read, I've defined a

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.