Closed nornagon closed 4 years ago
Oh weird. I think it's due to the LocalStorage API not auto-creating that directory.
The local storage API is used to track which archives you created locally to know when to load them and for the selectArchive
API.
https://github.com/datproject/sdk/blob/master/localstorage.js#L13
Would you be interested in a PR which uses the ensureDirSync
API from fs-extra to ensure that that folder exists before initializing LocalStorage?
This method is going to be deprecated in the latest version. 😅
I pulled the Promises example code from the README and ran it on a fresh machine (macOS) and encountered this error:
It looks like simply requiring
dat-sdk/auto
is enough to trigger this error: