You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing an issue when using the Vezgo SDK in a client-side ReactJS project, specifically with the Vite build tool. The error message I'm encountering is as follows:
"Module "util" has been externalized for browser compatibility. Cannot access "util.inherits" in client code.
get @ isBufferBrowser.js:7
[...] ion @ util.js:39
node_modules/vezgo-sdk-js/lib/vezgo.js @ util.js:45
Uncaught TypeError: util.inherits is not a function
at 97006 (vezgo.js:21743:7)
at webpack_require (vezgo.js:27193:18)"
This issue appears to be similar to problems faced with the jsonwebtoken library, which also requires polyfills. I have successfully added polyfills for local development but the issue persists in the production build.
I've read this resource which explains that Vite (and Webpack 5) do not polyfill Node.js built-in modules by default in order to maintain browser compatibility. Since Node.js built-in modules don't exist in the browser, it's reasonable that this practice is discouraged.
My question is: has anyone managed to find a workaround for this issue or a way to make the Vezgo SDK compatible with Vite and similar modern build tools? Any insights or solutions would be greatly appreciated.
Thks in Advance,
Paul
The text was updated successfully, but these errors were encountered:
Hello,
I'm facing an issue when using the Vezgo SDK in a client-side ReactJS project, specifically with the Vite build tool. The error message I'm encountering is as follows:
"Module "util" has been externalized for browser compatibility. Cannot access "util.inherits" in client code.
get @ isBufferBrowser.js:7
[...] ion @ util.js:39
node_modules/vezgo-sdk-js/lib/vezgo.js @ util.js:45
Uncaught TypeError: util.inherits is not a function
at 97006 (vezgo.js:21743:7)
at webpack_require (vezgo.js:27193:18)"
This issue appears to be similar to problems faced with the jsonwebtoken library, which also requires polyfills. I have successfully added polyfills for local development but the issue persists in the production build.
I've read this resource which explains that Vite (and Webpack 5) do not polyfill Node.js built-in modules by default in order to maintain browser compatibility. Since Node.js built-in modules don't exist in the browser, it's reasonable that this practice is discouraged.
My question is: has anyone managed to find a workaround for this issue or a way to make the Vezgo SDK compatible with Vite and similar modern build tools? Any insights or solutions would be greatly appreciated.
Thks in Advance,
Paul
The text was updated successfully, but these errors were encountered: