The importFramework utility function throws an unhelpful error message when NSBundle.bundleWithPath_(path) returns null (e.g. because the path was invalid):
/Users/foo/node_modules/objc/src/util.js:25
bundle.load();
TypeError: Cannot read properties of null (reading 'load')
I suggest inserting a null check before the bundle.load() line that throws a descriptive error:
if (bundle === null) { throw Error(`Framework not found: '${path}'`); }
The
importFramework
utility function throws an unhelpful error message whenNSBundle.bundleWithPath_(path)
returnsnull
(e.g. because the path was invalid):I suggest inserting a null check before the
bundle.load()
line that throws a descriptive error: