Skip to Content
0
Dec 12, 2022 at 03:27 PM

Uncaught Reference error require not defined

207 Views

Hello Experts

I have included 3rd party JavaScript file.in UI5 Application.

But when i call the 3rdParty js file i am getting " Uncaught Reference error require not defined " error message.

the JS file has require statement [ i.e var sha256 = require("crypto-js/sha256); ]

Because this require statement in the included 3rdparty JS file i am getting Uncaught Reference error require not defined error message.

I have included other 3rd Party JS file that has not require statement is working fine.

I have tried changing "type" : "commonJs" in Package,JSON, but getting same error message.

Please help me to resolve the issue and move forward.

Thanks

Karthi D.