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) sudonix@vps:~/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
-
@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 issuingnpm 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 is14.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 under1.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 is1.19.4
(currently). I've removednodebb-plugin-featured-topics-extended
so @yariplus should probably investigate. -
-
0.10.1 should fix I think.