Im having this strange problem where importing the textile/hub package in node then destructuring it later the program gives an error, but when I destructure while importing the code doesn't error at all. Does anyone know why this is happening, destructuring while importing works fine for the program but I'm still curious.
import textileHub from '@textile/hub';
const { Client, ThreadID, PrivateKey } = textileHub;
// This fails saying that textileHub is undefined
import { Client, ThreadID, PrivateKey } from '@textile/hub';
// this works perfectly