Unsolved New install of 1.19.5 error


  • Hi. Copied my prod database to my dev area, installed NodeBB from scratch, recovered the DB, then when I attempt to perform any builds (after installing missing plugins), I get

    2022-03-18T19:10:41.525Z [4570/606204] - error: [build]          requirejs modules  build failed
    2022-03-18T19:10:41.526Z [4570/606204] - error: [build] Encountered error during build step
    Error: Error: Error minifying undefined
    TypeError: Cannot read property 'figure_out_scope' of null
        at Object.minify (eval at <anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/node_modules/uglify-es/tools/node.js:21:1), <anonymous>:14864:38)
        at minifyAndSave (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:193:26)
        at /home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:161:9
        at minifyAndSave (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:203:9)
        at /home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:161:9
        at ChildProcess.<anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:83:19)
        at ChildProcess.emit (events.js:400:28)
        at emit (internal/child_process.js:912:12)
        at processTicksAndRejections (internal/process/task_queues.js:83:21)
    2022-03-18T19:10:41.526Z [4570/606204] - error: Error: Error: Error minifying undefined
    TypeError: Cannot read property 'figure_out_scope' of null
        at Object.minify (eval at <anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/node_modules/uglify-es/tools/node.js:21:1), <anonymous>:14864:38)
        at minifyAndSave (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:193:26)
        at /home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:161:9
        at minifyAndSave (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:203:9)
        at /home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:161:9
        at ChildProcess.<anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:83:19)
        at ChildProcess.emit (events.js:400:28)
        at emit (internal/child_process.js:912:12)
        at processTicksAndRejections (internal/process/task_queues.js:83:21)
    [email protected]:~/domains/test.sudonix.com/nodebb$ events.js:377
          throw er; // Unhandled 'error' event
          ^
    
    Error: write EPIPE
        at process.target._send (internal/child_process.js:841:20)
        at process.target.send (internal/child_process.js:712:19)
        at process.<anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:118:13)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
    Emitted 'error' event on process instance at:
        at internal/child_process.js:845:39
        at processTicksAndRejections (internal/process/task_queues.js:77:11) {
      errno: -32,
      code: 'EPIPE',
      syscall: 'write'
    }
    events.js:377
          throw er; // Unhandled 'error' event
          ^
    
    Error: write EPIPE
        at process.target._send (internal/child_process.js:841:20)
        at process.target.send (internal/child_process.js:712:19)
        at process.<anonymous> (/home/sudonix/domains/test.sudonix.com/nodebb/src/meta/minifier.js:118:13)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
    Emitted 'error' event on process instance at:
        at internal/child_process.js:845:39
        at processTicksAndRejections (internal/process/task_queues.js:77:11) {
      errno: -32,
      code: 'EPIPE',
      syscall: 'write'
    }
    
    
    

    Any ideas ?

    Thanks

  • NodeBB Admin

    @phenomlab said in New install of 1.19.5 error:

    Cannot read property 'figure_out_scope' of null

    Can you compare the version of "uglify-es": "3.3.9", on both environments? Also what is the nodejs version on these?


  • @baris said in New install of 1.19.5 error:

    @phenomlab said in New install of 1.19.5 error:

    Cannot read property 'figure_out_scope' of null

    Can you compare the version of "uglify-es": "3.3.9", on both environments? Also what is the nodejs version on these?

    The version of uglify-es on PROD is 3.3.9, although the DEV instance doesn't appear to have this installed. Even issuing npm install uglify-es (also at 3.3.9) when actually installed does not work. The PROD instance is running 1.19.4, and the NodeJS version for each is 14.9.1

    I noticed that according to https://docs.nodebb.org/installing/os/ubuntu/ the NodeJS version should be 16.x - is this officially supported ? I seem to recall a previous issue I had that required me to downgrade NodeJS.


  • Right - found the culprit. It's the plugin nodebb-plugin-featured-topics-extended from @yariplus causing this error. If I disable this specific plugin, the build process completes successfully under 1.19.5.

    Edit - still something not right here. I can build and restart from the command line, but get the same error as I posted originally when doing the same from the ACP


  • Now seeing exactly the same issues in PROD since a recent upgrade of nodebb-plugin-featured-topics-extended, NodeBB is 1.19.4 (currently). I've removed nodebb-plugin-featured-topics-extended so @yariplus should probably investigate.

  • Referenced by  phenomlab phenomlab 
  • Community Rep

    0.10.1 should fix I think.

  • GNU/Linux Admin


  • @yariplus Is there any way this could work with a custom page ? I've tried to add this as a widget on a custom page, but nothing is rendered ?


Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.