HipsterBrown / xs-dev

The quickest way for getting started with JS on devices
https://xs-dev.js.org
MIT License
41 stars 13 forks source link

fix(nrf52): make node-lzma an optional dep, handle dynamic import #140

Closed HipsterBrown closed 1 year ago

HipsterBrown commented 1 year ago

For development environments that don't have xz utils available for the node-lzma native bindings, that dependency is now optional until attempting to setup the nrf52 tooling on Linux or MacOS. If node-lzma is not available, a helpful error message will be displayed.

I've also added a new "Troubleshooting" page that can be indexed to help folks find solutions to known issues.

Screenshot 2023-08-18 at 4 43 33 PM

In the future, it could be helpful to prompt xs-dev users to automatically install the XZ utils and attempt to install node-lzma after; rather than just display an error. I'm not sure how to do this without more experimentation, so this patch will suffice for the time being.

phoddie commented 1 year ago

This is awesome and a great model for future troubleshooting posts. Thank you!