Adding some basic integration for gsheets api, I'm using loadJSON rather than fs when handling files for auth, which I believe is the way you intend files to be accessed?
Issue is I need an error handler and a callback. Does/could loadJSON have either of these available?
Using the native fs module is fine, loadJSON is merely here to provide a simplified file reader. That being said it shouldn't be a problem to add an optional errorCallback argument to it.
Thanks for the speedy reply!
Ok, I couldn't get fs pointing to the correct place somehow but maybe more persistence is needed!
I'm getting this error. This doesn't happen when I run this normally outside of osc.
Error: EROFS: read-only file system, open './config.json'
Could it be that
./config.json doesn't resolve to the same location when "outside of osc" ? This error message suggests an issue that not related to open stage control itself but rather to where the file is located.