The program should be able to create a path to a file based on the working directory.
Actual behavior
Program won't start:
App threw an error during load
TypeError: Cannot read properties of undefined (reading '__dirname')
at Xge_5_ (*** path to file***\main.js:1:38379)
at Object.<anonymous> (*** path to file***\main.js:1:13041)
at Module._compile (node:internal/modules/cjs/loader:1391:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1451:10)
at Module.load (node:internal/modules/cjs/loader:1214:32)
at Module._load (node:internal/modules/cjs/loader:1030:12)
at c._load (node:electron/js2c/node_init:2:13672)
at cjsLoader (node:internal/modules/esm/translators:360:17)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:305:7)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
Additional context
The internal node variable __dirname is no longer recognized.
Describe the bug:
The Electron project won't start because the Node variable
__dirname
becomes undefined once run through js-confuser.Config and Small code sample
Config:
Code:
Expected behavior
The program should be able to create a path to a file based on the working directory.
Actual behavior
Program won't start:
Additional context
The internal node variable
__dirname
is no longer recognized.