I am writing a Mac App that currently relies on the presence of a node binary. The main inconvenience with this approach is, that the user needs to grant access to the node binary as well as the global node_modules folder due to App Store restrictions.
So my idea is to add both the node binary as well as all needed node modules to the Mac App, but I'm not sure how to do this. I know you can add the binary and then use it like this:
[task setLaunchPath:[[NSBundle mainBundle] pathForResource:@"node" ofType:@""]];
My question now is, how do I tell node about the custom node_modules location?
I shipped an app on the OS X App Store that relies on node. What I ended up doing was include node directly in my app directory. node will crawl the filesystem and use the first node_modules it can find, so you don't have to configure anything.
Here's the structure I eventually used:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With