planning for the eventual failure of bundle.run

Does anyone have a handy function to identify and mitigate potential failures w/ bundle.run?

I am using bundle.run to help me convert Nepali ‘Preeti’ font to unicode, as follows:

preeti = require('https://bundle.run/preeti@1.0.3')

bundle.run has been failing the past few days, though wzrd.in works:

preeti_alt = require('https://wzrd.in/standalone/preeti@1.0.3')

While it’s simple enough for me just to edit in and out the _alt extension when calling the function, it’d be ideal if I didn’t have to–if, upon failure of one require, the next one is automatically attempted.

Any guidance? :pray:

Here’s my conversion notebook:

I recommend saving the output of bundle.run or wzrd.in as a file, and then attaching it to your notebook. You can then load it like so (replacing the file name as appropriate):

preeti = require(await FileAttachment("preeti.js").url())
3 Likes

Thanks @mike! :man_dancing: This certainly does the trick :slight_smile: I’ve re-shared the notebook with your recommended approach for anyone later clicking through these topics.

1 Like

Sometimes bundle.run will cache a failed build. You can work around it and force a new build by slightly changing the URL, e.g. require('https://bundle.run/preeti@1.0.3?foo') (it doesn’t matter what you append).

2 Likes