I am also getting this error.
version :
javascript-obfuscator -v
4.0.0_2022-02-14T16:47:01.077Z
I am on Red Hat 4.8.5-11
Command used
javascript-obfuscator gh.js --config test.json
The config file is a copy of the "High obfuscation, low performance" found on the README.md
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 0.75,
transformObjectKeys: true,
unicodeEscapeSequence: false
}
error:
/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/utils/CLIUtils.ts:41
throw new ReferenceError(Cannot open config file with path: ${configPath});
^
ReferenceError: Cannot open config file with path: /home/gotop/jenkins/javascript/test/test.json
at Function.getUserConfig (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/utils/CLIUtils.ts:41:23)
at Function.buildOptions (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/JavaScriptObfuscatorCLI.ts:66:76)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/JavaScriptObfuscatorCLI.ts:90:56)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.initialize (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at Function.obfuscate (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/JavaScriptObfuscatorCLIFacade.ts:9:33)
I am also getting this error.
version :
javascript-obfuscator -v
4.0.0_2022-02-14T16:47:01.077Z
I am on Red Hat 4.8.5-11
Command used
javascript-obfuscator gh.js --config test.json
The config file is a copy of the "High obfuscation, low performance" found on the README.md
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
stringArray: true,
stringArrayEncoding: ['base64'],
stringArrayThreshold: 0.75,
transformObjectKeys: true,
unicodeEscapeSequence: false
}
error:
/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/utils/CLIUtils.ts:41
throw new ReferenceError(
Cannot open config file with path: ${configPath});^
ReferenceError: Cannot open config file with path: /home/gotop/jenkins/javascript/test/test.json
at Function.getUserConfig (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/utils/CLIUtils.ts:41:23)
at Function.buildOptions (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/JavaScriptObfuscatorCLI.ts:66:76)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/cli/JavaScriptObfuscatorCLI.ts:90:56)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.apply (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at L.initialize (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/decorators/Initializable.ts:80:43)
at Function.obfuscate (/home/gotop/nodejs/node_global/lib/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/JavaScriptObfuscatorCLIFacade.ts:9:33)