Closed 0wwafa closed 1 month ago
I have a nodejs program in commonJS. it works normally, it also works with SIMPLE optimization.. but not with ADVANCED and gives these errors:
shell.js:56:13: ERROR - [JSC_UNDEFINED_VARIABLE] variable console is undeclared 56| DEBUG && console.log('\nCFGFILE:\n',cfgfile); ^^^^^^^
shell.js:73:8: ERROR - [JSC_UNDEFINED_VARIABLE] variable process is undeclared 73| process.exit(); // Exit the server process ^^^^^^^
shell.js:84:21: ERROR - [JSC_UNDEFINED_VARIABLE] variable signal is undeclared 84| const id = await signal.send( ^^^^^^
shell.js:191:8: ERROR - [JSC_UNDEFINED_VARIABLE] variable setTimeout is undeclared 191| setTimeout(() => process.exit(code), 1000);
why?!
In advanced mode you would need to specify externs used in your JS code. See -
I have a nodejs program in commonJS. it works normally, it also works with SIMPLE optimization.. but not with ADVANCED and gives these errors:
shell.js:56:13: ERROR - [JSC_UNDEFINED_VARIABLE] variable console is undeclared 56| DEBUG && console.log('\nCFGFILE:\n',cfgfile); ^^^^^^^
shell.js:73:8: ERROR - [JSC_UNDEFINED_VARIABLE] variable process is undeclared 73| process.exit(); // Exit the server process ^^^^^^^
shell.js:84:21: ERROR - [JSC_UNDEFINED_VARIABLE] variable signal is undeclared 84| const id = await signal.send( ^^^^^^
shell.js:191:8: ERROR - [JSC_UNDEFINED_VARIABLE] variable setTimeout is undeclared 191| setTimeout(() => process.exit(code), 1000);
why?!