VS Code (and others) sometimes inserts the following import
during an autocomplete:
const { default: Moralis } = require("moralis/types");
It usually results in the following error for me:
ReferenceError: Cannot access 'Moralis' before initialization
I canāt tell you how many times this import has busted all my cloud functions and sent me down a rabbit hole for over an hour, only to ārememberā itās a potential issue.
Not sure what the solution is, but this definitely needs to be mitigated somehow.
Iāve been told this is related to using v1 of the SDK. We currently have multiple applications that rely on the existing codebase. Hopefully Iāll have some time during the upcoming holiday to look at āupgradingā.
If anyone has any further insight, please do share.