I build my project with Electron. Its run on Nodejs. I compile this project with Electron-Packager. It's run, but when i move compiled folder, project won't run I get some path errors.
export function getSafeWPPath(): string {
let home = app.getPath('home');
home = path.resolve(home, ".SafeWP");
if (!fs.existsSync(home)) {
fs.mkdirSync(home);
}
return home;
}
I get
Uncaught Exception:
TypeError: Cannot read property 'resolve' of undefined
at getSafeWPPath