Why my aes function now needs crypto module needed in new netlify version whereas it didn't in old

nodejs now integrates crypto module natively, and my crypto function did work in old netlify site. I created a new site and now it failed to deploy. Isn’t this kind of regression ?

Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
1:01:52 PM: In file “/opt/build/repo/netlify/functions/aes-decrypt.js”
1:01:52 PM: Cannot find module ‘crypto-js’
1:01:52 PM: Require stack:
1:01:52 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js
1:01:52 PM: ​
1:01:52 PM: Resolved config
1:01:52 PM: build:
1:01:52 PM: publish: /opt/build/repo
1:01:52 PM: publishOrigin: ui
1:01:52 PM: functionsDirectory: /opt/build/repo/netlify/functions

You need to install module crypto-js neven if Nodejs now has a crypto module. It’s either you use the Native Node.js crypto API or you use the packages (crypto-js) API.
The API of the Node.js crypto module and the crypto-js package are different.

Node.js Crypto Module:
https://nodejs.org/api/crypto.html

Kindly visit the official npm page of the crypto-js package in the link below and then install and configure

Hope the above explanation and suggestion helps.

Thanks.