node app --setup causes crash



  • I just cloned the github repo. When I try to run node app --setup, after going through all the steps of the setup, this is the error I get:

    /Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/redis/index.js:535
                throw err;
                      ^
    ReferenceError: templates is not defined
        at render (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/src/emailer.js:13:6)
        at Object.async.parallel.html (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/src/emailer.js:25:4)
        at /Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/async/lib/async.js:521:25
        at /Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/async/lib/async.js:108:13
        at Array.forEach (native)
        at _each (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/async/lib/async.js:32:24)
        at Object.async.each (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/async/lib/async.js:107:9)
        at _parallel (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/async/lib/async.js:520:20)
        at Object.async.parallel (/Users/aaronclaytondunn/Documents/WebDev/forum/nodebb/forum/nodebb/node_modules/asyncAarons-MacBook-Air-2:nodebb aaronclaytondunn$ 
    

    Any ideas? Thanks!


  • Staff Admin


  • GNU/Linux Admin

    @aaron -- could you also let us know your Redis version? We think that may have something to do with your error.


  • Staff Admin

    I would like to see the output of hgetall config too from your redis if you don't mind 🙂



  • Hi, thanks for the help!

    I made those updates and I'm still getting the same error. Here's the requested info:

    $ redis-server --version
    Redis server v=2.8.4 sha=97ec312c:0 malloc=libc bits=64 build=76d9bf37c9568124

    $ redis-cli hgetall config

    1. "title"
    2. "NodeBB"
    3. "postDelay"
    4. "10"
    5. "minimumPostLength"
    6. "8"
    7. "allowGuestPosting"
    8. "0"
    9. "allowGuestSearching"
    10. "0"
    11. "allowRegistration"
    12. "1"
    13. "allowFileUploads"
    14. "0"
    15. "maximumFileSize"
    16. "2048"
    17. "minimumTitleLength"
    18. "3"
    19. "maximumTitleLength"
    20. "255"
    21. "minimumUsernameLength"
    22. "2"
    23. "maximumUsernameLength"
    24. "16"
    25. "minimumPasswordLength"
    26. "6"
    27. "imgurClientID"
    28. ""
    29. "maximumSignatureLength"
    30. "255"
    31. "maximumProfileImageSize"
    32. "256"
    33. "chatMessagesToDisplay"
    34. "50"
    35. "theme:type"
    36. "local"
    37. "theme:id"
    38. "nodebb-theme-cerulean"

    Re redis: I just ran the default server because the config file I have set up that worked with my last build doesn't work locally because of file paths and I figured I'd just test it out with the default redis instance. But I'll try it out pointing to /redis-stable/redis.conf now...


  • Staff Admin

    Oops sorry I meant hgetall global 🙂



  • $ redis-cli hgetall global

    1. "nextUid"
    2. "4"
    3. "userCount"
    4. "4"
    5. "nextGid"
    6. "3"

  • Staff Admin

    Ok that seems to be the issue. You have some users already and when you run setup again it is trying to create a new admin user as uid 5 and trying to send an email which crashes. Not sure why its asking for an admin user though. uid 1 should be the admin. Can you run hgetall user:1. That should be the admin user and node app --setup shouldn't ask again.



  • Okay, so I got it working by running a config file. But it still has me set up an admin each time. Here's the readout you requested:

    $ redis-cli hgetall user:1

    1. "username"
    2. "test2"
    3. "reputation"
    4. "0"
    5. "password"
    6. "xx"
    7. "gravatarpicture"
    8. "http://www.gravatar.com/avatar/fb011f4bfe0c3c8d57755071fa4a0463?size=128&default=identicon&rating=pg"
    9. "uploadedpicture"
    10. ""
    11. "banned"
    12. "0"
    13. "lastonline"
    14. "1390440526398"
    15. "email"
    16. "asdfafd@asdf.com"
    17. "lastposttime"
    18. "0"
    19. "signature"
    20. ""
    21. "uid"
    22. "1"
    23. "website"
    24. ""
    25. "fullname"
    26. ""
    27. "birthday"
    28. ""
    29. "picture"
    30. "http://www.gravatar.com/avatar/fb011f4bfe0c3c8d57755071fa4a0463?size=128&default=identicon&rating=pg"
    31. "postcount"
    32. "0"
    33. "profileviews"
    34. "0"
    35. "joindate"
    36. "1390440376517"
    37. "location"
    38. ""
    39. "showemail"
    40. "0"
    41. "userslug"
    42. "test2"

Log in to reply
 

Suggested Topics

  • 10
  • 1
  • 6
  • 3
  • 8
| |