# ReferenceError | window is not defined

**URL:** <https://community.postman.com/t/referenceerror-window-is-not-defined/13349>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [June 12, 2020, 11:38am UTC](https://community.postman.com/t/referenceerror-window-is-not-defined/13349 "2020-06-12T11:38:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhoulei201505](https://avatars.discourse-cdn.com/v4/letter/z/9d8465/32.png) [@zhoulei201505](https://community.postman.com/u/zhoulei201505)\
**Post date:** [June 12, 2020, 11:38am UTC](https://community.postman.com/t/referenceerror-window-is-not-defined/13349/1 "2020-06-12T11:38:29Z")

</div>

I tried to use rsa encryption and decryption. When I set eval(postman.getGlobalVariable(“forgeJS”)) in Pre-request Script, it reports an error that there was an error in evaluating the Pre-request Script: ReferenceError: window is not defined

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [June 12, 2020, 11:51am UTC](https://community.postman.com/t/referenceerror-window-is-not-defined/13349/2 "2020-06-12T11:51:33Z")

</div>

Hey @zhoulei201505

Welcome to the community!! 🚀

Are you able to provide more context of what the _forgeJS_ global variable is please?
