MacOs - Uncaught ReferenceError: crypto is not defined

Hi, I using the nanoid npm package, works fine on the web, but when I try the mac os version build I get this error.

The only thing is maybe some web dependency is missing, this package don’t use any dependency, just the web crypto I think. As far as I know is a web view on the mac build with some native dependencies, so should work.

Any ideas why? is the only npm dependency I use.

JS: [ERROR]: (see stack) Uncaught ReferenceError: crypto is not defined  - [0]anonymous@/build/mac/proj/Debug/TCGB-desktop.app/Contents/Resources/src/chunks/bundle.js:8

I can ask engineering if they have any thoughts on this. What version of Creator are you using? Do you have a demo project that reproduces the issue?

Please tell us the CocosCreator version number we are using.