Empty Homepage



  • Hello! I'm just getting started with nodebb and ran into some trouble while making a custom theme. The theme I'm making is based on the Vanilla theme. My first attempt at making the theme was to

    1. Copy the Vanilla theme files from /node_modules/nodebb-theme-vanilla to /node_modules/nodebb-theme-mytheme
    2. Change the theme name in plugin.json, package.json, and theme.json.
    3. Restart nodebb

    This didn't work very well, so I deleted my custom theme directory and started over. My second attempt went better. This time I cloned the Vanilla theme repo into /node_modules/nodebb-theme-mytheme, and again modified the json files by swapping out all instances of "vanilla" and swapping in my theme name.

    This worked well, except that I found that the home page was now empty (meaning that the header exists, but the page content is empty). I renamed our custom theme to hide it from nodebb, switched back to the Vanilla theme, and restarted nodebb. I hoped this would bring me back to a working state. Unfortunately, the homepage is still blank!

    My nodebb log contains:

    3/12 00:12 [24431] - info: [app] Web server closed to connections.
    3/12 00:12 [24431] - info: [app] Shutdown complete.
    3/12 00:12 [26782] - info: Time: Sat Dec 03 2016 00:12:37 GMT+0000 (UTC)
    3/12 00:12 [26782] - info: Initializing NodeBB v1.2.1
    3/12 00:12 [26782] - info: NodeBB Ready
    3/12 00:12 [26782] - info: Enabling 'trust proxy'
    3/12 00:12 [26782] - info: NodeBB is now listening on: 0.0.0.0:4567
    info: Imgbed: regex recompiled: (?<url>https?://[^\s]+/(?<filename>[\w_0-9-.]+.(jpg|jpeg|gif|gifv|png|svg))([^\s]*)?)
    info: Imgbed: cache initialized to size 3
    (node:26782) DeprecationWarning: Using Buffer without new will soon stop working. Use new Buffer(), or preferably Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() instead.

    When loading the homepage, the javascript console contains the following:

    The connection to ws://corp.(our domain).com:4567/socket.io/?EIO=3&transport=websocket&sid=--37RXCrMAlZx2k8AAAK was interrupted while the page was loading. nodebb.min.js:5:24414
    nodebb-plugin-custom-pages: loaded nodebb.min.js:11:21623
    mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create
    Any suggestions?

    Thanks,
    Bret


  • Community Rep

    Try resetting plugins yet? ./nodebb reset -p


  • Admin

    Also, ./nodebb reset -t to trigger back to Persona.



  • Hmm. Neither ./nodebb reset -p nor ./nodebb reset -t worked. When I did reset -t, nodebb complained that the homepage route could not be found:

    "Not Found
    You seem to have stumbled upon a page that does not exist."

    Our home page route is set to "Custom" and the Custom Route is set to Home. It's possible that one of my follow developers may have made changes without telling me. Could this be causing the empty homepage?


  • Global Moderator

    @Bret run ./nodebb build



  • @PitaJ ./nodebb build does not seem to be a valid option:

    root@myserver:/var/www/html/forum/nodebb# ./nodebb build
    
    Welcome to NodeBB
    
    Usage: ./nodebb {start|stop|reload|restart|log|setup|reset|upgrade|dev}
    
    start	Start the NodeBB server
    stop	Stops the NodeBB server
    reload	Restarts NodeBB
    restart	Restarts NodeBB
    log	Opens the logging interface (useful for debugging)
    setup	Runs the NodeBB setup script
    reset	Disables all plugins, restores the default theme.
    activate	Activate a plugin on start up.
    plugins	List all plugins that have been installed.
    upgrade	Run NodeBB upgrade scripts, ensure packages are up-to-date
    dev	Start NodeBB in interactive development mode
    

    I tried ./nodebb upgrade, and got:

    root@myserver:/var/www/html/forum/nodebb# ./nodebb upgrade
    1. Bringing base dependencies up to date... 
    Error: Command failed: /usr/bin/env npm i --production
    npm ERR! Linux 4.6.5-x86_64-linode71
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--production"
    npm ERR! node v7.0.0
    npm ERR! npm  v3.10.8
    npm ERR! path /var/www/html/forum/nodebb/node_modules/tmp-nodebb-theme-2600hz
    npm ERR! code EISGIT
    
    npm ERR! git /var/www/html/forum/nodebb/node_modules/tmp-nodebb-theme-2600hz: Appears to be a git repo or submodule.
    npm ERR! git     /var/www/html/forum/nodebb/node_modules/tmp-nodebb-theme-2600hz
    npm ERR! git Refusing to remove it. Update manually,
    npm ERR! git or move it out of the way first.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /var/www/html/forum/nodebb/npm-debug.log
    

    Any suggestions? I'm not sure if an upgrade was necessary. If so, I tracked down this similar error (https://community.nodebb.org/topic/9833/help-please-how-uninstall-nodebb-package-manager), but it doesn't shed much light on to the problem.

    Thanks in advance,
    Bret


  • Global Moderator

    @Bret to fix that npm error you need to move or delete that tmp- folder in node_modules.



  • Thanks, it looks like I'm back up and running. ✨


Log in to reply
 


Star

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.