I am facing an issue with a npm package I imported into my Deno project. The code in the package contains a condition:
if (typeof window === 'undefined') {
throw new Error('Error initializing the sdk: window is undefined');
}
Whenever this condition is met, my program throws an error stating "window is undefined".
Interestingly, I can actually access the window object in my Deno project. Furthermore, when I set a breakpoint on the condition line within the cache folder files, I am able to access the window object from the debug console as well.
I would greatly appreciate any assistance in resolving this issue so that my program can properly function with the npm package that relies on the window object.
Thank you in advance for your help.