Is there any way to use @octokit/rest

I followed the instructions provided by https://beta.observablehq.com/@tmcw/module-require-debugger.

I use:

f = require(’@octokit/rest@15.11.4/index.js’).catch(() => window.GitHubApi)

Now I’m able to load the library, but when I try to use it (with f()) I get a ReferenceError: defaultsDeep is not defined

Any hint?

The require statement you’ve posted uses a bare module from unpkg.com which doesn’t have dependencies bundled; that’s why defaultsDeep (which is a lodash function) can’t be found.

It looks like f = require('https://bundle.run/@octokit/rest@15.11.4') might work instead.