Composer-Defaults fails with latest master

Technical Support
  • Hi Devs,

    Pulled the latest code today.
    There seems to be an issue with composer-defaults failing at websockets line 128:

    error: uncaughtException: Cannot read property 'children' of undefined
    TypeError: Cannot read property 'children' of undefined
    at /home/nodebb/www/nodebb/node_modules/nodebb-plugin-composer-default/websockets.js:128:73

    Any idea what went wrong?

    Here is the relevant piece of code from websockets.js:

    const hasChildren = !!c.children.length;
    				if (hasChildren) {
    					c.disabledClass = true;
    				} else if (c.parent) {
    					cidToCategory[c.parent.cid].children = cidToCategory[c.parent.cid].children.filter(child => {
    						return child.cid !== c.cid;
  • What are you doing when the error shows up?

  • Hi @julian that's a tough one.
    I have been trying to debug this issue before I posted but was unable to re-create the crash.
    All I have is the logs to go with, unfortunately.
    I posted in hope that this error may be related to something that was worked on in the past few days.
    My apology for not being so helpful.

  • Anyone ending here, the issue was observed by @baris and being discussed in this post:

Suggested Topics

  • Composer preview window hook

    Unsolved Technical Support
    1 Votes
    9 Posts

    ...deleted. Nevermind, it works fine. 😊

  • 0 Votes
    1 Posts

    The entire error below. I've been searching for some clues, but coming up empty handed and hoping someone can help. This is a fresh install on a debian 10 server.

    2020-04-17T16:33:02.636Z [26376] - error: [build] admin control panel styles build failed 2020-04-17T16:33:02.639Z [26376] - error: resource ',400,500,700' gave this Error: Error: socket hang up {"type":"File","filename":"/var/www/nodebb/nodebb/public/less/admin/paper/bootswatch.less","index":87,"line":5,"column":0,"callLine":null,"extract":["","@import url(\",400,500,700\");",""]} ==================================================================================================================================== 2020-04-17T16:33:02.647Z [26376] - error: resource ',400,500,700' gave this Error: Error: socket hang up {"type":"File","filename":"/var/www/nodebb/nodebb/public/less/admin/paper/bootswatch.less","index":87,"line":5,"column":0,"callLine":null,"extract":["","@import url(\",400,500,700\");",""]} (node:26376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 1) (node:26376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  • Composer help modal window

    Solved Technical Support
    0 Votes
    3 Posts

    @MJ thx bro) very helpful.

    Now is ok.

  • 1 Votes
    2 Posts

    Hey there, please report the version of your composer plugin, as well as git rev-parse HEAD in NodeBB. Thanks.

  • 1 Votes
    13 Posts


    I can do this by using a \ on a line.