Realm Functions importing dependencies: Cannot find module 'module-name'

I have a weirder issue.
When I run the function individually, either from a client SDK or the web its works and the dependency is being imported and used.
When the function runs as part of a Trigger (Auth trigger for example) the dependency is not found and function fails.

From the logs:
Cannot find module ‘myModule’

Note:
The app is released to the Store and was working fine for the past 2-3 months. Something happened this month and it stopped working on with Triggers.