This pull request addresses an issue with the Deepgram SDK when used in Vite environments.
Currently, the SDK relies on the process.versions.node property to determine the Node.js version. However, in Vite environments, the process object is not available, leading to errors.
The proposed fix is a check to verify the existence of the process object before accessing process.versions.node. If process is undefined, the NODE_VERSION constant defaults to "unknown".
This change ensures compatibility with Vite and other environments where the process object is not accessible.
This pull request addresses an issue with the Deepgram SDK when used in Vite environments.
Currently, the SDK relies on the process.versions.node property to determine the Node.js version. However, in Vite environments, the process object is not available, leading to errors.
The proposed fix is a check to verify the existence of the process object before accessing process.versions.node. If process is undefined, the NODE_VERSION constant defaults to "unknown".
This change ensures compatibility with Vite and other environments where the process object is not accessible.