Getting error using octokit as external library (Pull a library from a CDN) Error: exports is not defined

Here’s an outline with best practices for making your inquiry.

I have to retrieve the Github pull request, using the url:<user>/<repo>/pulls/<pr_number> and the repo`<user>/<repo>

I tried to use Octokit.js as is suggested in the Github documentation. I am using the next code:

Details (like screenshots):

pm.sendRequest("", (err, res) => {
   //convert the response to text and save it as an environment variable
   pm.collectionVariables.set("octokit_library", res.text());
   // eval will evaluate the JavaScript code and initialize the min.js

But it seems like it is not the correct way to use the octokit library in Postman. I got the next error:

There was an error in evaluating the Pre-request Script:Error: exports is not defined

I followed the next approach to import external libraries in Postman, using a Pull a library from CDN approach

How I found the problem:

I am musing the pre-request-script tab to test the code.

I’ve already tried:

If I use the minified version:

I get a different error message in the Postman console: