• Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Community

B

Bret

@Bret
About
Posts
8
Topics
2
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    RE: Cannot find module [..] my-theme/less/app.js
  • B Bret

    No worries, back to square one then, any suggestions? Would upgrading to 1.4 solve this issue? I'm currently on 1.2.1.

    Thanks,
    Bret


  • RE: Cannot find module [..] my-theme/less/app.js
  • B Bret

    @julian

    Is there a "build" command for nodebb? When I try to run that, I get:

    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
    

    Cheers,
    Bret


  • RE: Cannot find module [..] my-theme/less/app.js
  • B Bret

    Sure thing! Here is my plugin.json:

    {
        "id": "nodebb-theme-2600hz",
        "library": "./lib/theme.js",
        "hooks": [
    	   {
    	     "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas"
    	   }
        ],
        "scripts": [
    	   "lib/2600hz.js"
        ]
    }
    

    My theme name is nodebb-theme-2600hz. (I rewrote it in my original question.) Also, I verified that both 2600hz.js and theme.js both exist.


  • Cannot find module [..] my-theme/less/app.js
  • B Bret

    Hello! I was in the middle of making adjustments to my custom theme's LESS files, when all of a sudden, restarting Nodebb failed and I can't seem to start it. My nodebb logs say,

    Error: Cannot find module '/var/www/html/forum/nodebb/node_modules/nodebb-theme-mine/less/app.js'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:382:7)
    at startup (bootstrap_node.js:137:9)
    at bootstrap_node.js:497:3
    3 restarts in 10 seconds, most likely an error on startup. Halting.
    

    When I attempt to start nodebb, it hangs with the following output:

    [email protected]:/var/www/html/forum/nodebb/node_modules/nodebb-theme-mine/less# /var/www/html/forum/nodebb/nodebb start
    
    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb restart" to restart NodeBB
    
    [email protected]:/var/www/html/forum/nodebb/node_modules/nodebb-theme-mine/less# (node:17963)     DeprecationWarning: Calling an asynchronous function without callback is deprecated.
    

    At first, I thought perhaps it was an error in my LESS file, and in fact I did find and correct an error, but it didn't fix the problem. Any suggestions?

    Thanks,
    Bret


  • RE: Empty Homepage
  • B Bret

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


  • RE: Empty Homepage
  • B Bret

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

    [email protected]:/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:

    [email protected]:/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


  • RE: Empty Homepage
  • B Bret

    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?


  • Empty Homepage
  • B Bret

    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

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.