HmacSHA256 encryption happens in angular local, but when built to netlify it does not happen

Hello there,

I have a resort booking application which has front end Angular and back-end Zoho creator. I have used edge functions in Netlify to link API from Zoho.

I’m facing issues when building.

This is the website link: https://vanavihari-ng.netlify.app/#/sign-in

I need encryption for the integration of the payment gateway Billdesk

it works in angular, but when building it fails.

The backend is Zoho creator

Frontend is angular 16, node 18
crypto.js “@types/crypto-js”: “^4.2.2”,

Can anyone tell me what is the exact issue? Let me know if you need more info.
Thank you in advance for your help

Thank you,
Balachandiran
TenSketch

The same error is mentioned here without a solution:

Hi, @TenSketch. Did you import it using the method described here?

Quoting:

  • Imports of Node built-in modules must be prefixed with node:, for example import { randomBytes } from "node:crypto".