The app works fine when I run it via $npm start
. After I have built the app using electron-packager the javascript within the built app can't find assets in the images directory.
Example: I define the app icon in my main.js var mb = menubar({width: 370, height: 210, preloadWindow:true, icon: 'img/icon/icon.png'});
It gives the error Uncaught Error: ENOENT: no such file or directory, open 'img/icon/icon.png'
.
If I load the image in the HTML it works fine.