title: unable to load and eval javascript code in postman pre-request
body: <p>I am trying to load external javascript in the pre-request tab of postman request by following the steps mentioned in <a href="https://blog.postman.com/adding-external-libraries-in-postman/" rel="nofollow noreferrer">https://blog.postman.com/adding-external-libraries-in-postman/</a> but seems like it is not working. Below is the code I am trying and it is not loading. I am not sure what is wrong and what is not working</p>
  <pre><code>pm.sendRequest(&quot;https://cdnjs.cloudflare.com/ajax/libs/chance/1.1.8/chance.min.js&quot;, (err, res) =&gt; {
     //convert the response to text and save it as an environment variable
     pm.collectionVariables.set(&quot;chancejs_library&quot;, res.text());
     eval(pm.collectionVariables.get(&quot;chancejs_library&quot;));
     console.log(this.chance().string()) // --&gt; not working
     console.log(this.chance()) // --&gt; not working
     console.log(this.Chance()) // --&gt; not working
     console.log(this.Chance().string()) // --&gt; not working
  })
  </code></pre>
  <p>In all the above cases, I get the same error</p>
  <pre><code>ReferenceError: chance is not defined
  </code></pre>