Electron Node.js node localstorage osx mkdir permission denied -


i working electron , node.js. have developed application works fine on windows , requirement had package mac os. packaged application using electron-packager, packaging process completes , package generated. double clicking throws error permission denied mkdir, using node localstorage maintain settings on user's local machine. somehow mac doesn't local storage create folder in root of application. in matter great. thanks

first off, code in question in main process or in renderer process? if latter, don't need use 'node-localstorage', because can use renderer's native localstorage. if in main process, need provide own storage strategy using 'node-localstorage' viable option.

in case, need consider store data; starters, let's @ electron's renderer processes store localstorage data: differs based on os, can get , set paths using app module -- path in question userdata, on os x default ~/library/application support/<app name>. electron uses folder persist cookies, caches, localstorage etc. suggest using folder well. (otherwise, refer xdg defaults defaults)

what example above trying store 'errorlogdb' in current working directory, might depend on os, app installed, how executed it, etc.

finally, it's idea differentiate between 'production' app , app during development , testing, because might not want use same storage folders every environment. in case, writing './errorlogdb' cause lots of headaches i'd thankful permission denied error.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -