What is the problem in this library.js?

NodeBB Development
  • I have this

    var tagsTitle = {};
      tagsTitle.init = function(params, callback) {
    var app = params.app;
    var controllers = params.controllers;
    module.exports = tagsTitle;

    But the console give me this error:

    "Type error: Object is not a function at Object.tagsTitle.init"

    What is the problem?

    Thanks for the help

  • What version of NodeBB are you using? if you're 0.4.x-0.5x you will need to use the older syntax

    tagsTitle.init = function(app, middleware, controllers, callback)

    (Or just update to 0.6x :P)

  • Thanks, problem solved, it was the nodebb version. Now I have 0.6.1

Suggested Topics

  • 0 Votes
    5 Posts


    @baris error is gone / fixed. Thank you!

  • 0 Votes
    1 Posts

    How to do following step on bash panel that come on cloud9 :

    The nodebb command after the git url will create a folder called nodebb so you have to cd into that directory after you have cloned NodeBB.

    Urgently help required

  • 0 Votes
    1 Posts

    Well, I have this issue that I need to do following things:
    1.Mongo Find
    2. Foreach
    3. MongoFind
    4 one more Foreach.

    because of asynchronaus mongo calls it is difficult to get proper result, however process.nextTick should handle this problem and still I have problem:

    function find(dbComm) {

    dbComm.forEach(function (current) { id= parseFloat(current.ID); db.anotherCollection.find({ ID: id}, function (error, result) { result.forEach(function (rank) { if (parseFloat(result.ID) == parseFloat(current.ID)) { rank.rank = 'Some calculations'; } }); }); });


    app.get('/someparams', function (req, res) {

    db.collection.find().sort({ "rank": order }).skip(pagenumber).limit(5, function (err, result) { process.nextTick(function () { find(result, function () { }) }); process.nextTick(function () { res.send(result); }); });

    And on client side I should recive an array where the rank equals 'Some Calculations'
    but unfortunetly it is not...
    However...! If I add setTimeout(function(){}) before res.send(result) (and res.send(result) will be placed inside setTimeout) it actually does work and on client side I recive data with "Some Calculations" but it is just timeout and it fails sometimes and client dont recive "Some Calculations"
    if I put process.nextTick instead of setTimeout it doesnt work and "Some calc..." are not sent.

    Something is beeing done eralier then it should (probably in forEach in find() function)
    and my question is how to deal with it? maybe I should put process.nextTick in different function ?

  • 0 Votes
    5 Posts

    @Scuzz Yes,sure

  • bCrypt problem

    NodeBB Development
    0 Votes
    2 Posts

    You may have to change the module library as outlined here: https://github.com/markau/bcrypt-nodejs/commit/b848a268d33ea08176c01332f3419bba20f9e851