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 have tried to start with a fresh project and reproduce the defect with minimal code changes.
I have read the console error messages carefully (if applicable).
Description
Vite projects require a Buffer shim to use @near-js/client
@near-js/utils uses bs58, which relies on Buffer. Vite does not inject polyfills by default, so Vite projects must use additional configuration to use @near-js/client:
Prerequisites
near-api-js
.Description
Vite projects require a
Buffer
shim to use@near-js/client
@near-js/utils
usesbs58
, which relies onBuffer
. Vite does not inject polyfills by default, so Vite projects must use additional configuration to use@near-js/client
:@near-js/client
should be usable without this polyfill, so it needs to eitherbs58
dependency with one that does not rely on globalBuffer
or@near-js/client
#1391 may be worth looking at first to see if the updated version works.
Reproducible demo
No response
Steps to reproduce
Import
@near-js/client
into a Vite project and run the app that calls a method for fetching/signing transactions (e.g.callViewMethod
)Expected behavior
🚫 🐛
✅ 🌞
Actual behavior
🐛
Your environment
Self-service
The text was updated successfully, but these errors were encountered: