AnkushSantra --> Good Evening, everyone. Everyone here is a blockchain expert. Can someone guide me on how to start my blockchain journey? Thank You!
Dorian | NEAR --> Hello!
Dorian | NEAR --> I’d suggest checking out https://www.near.university/ A program we developed to help give new users path to learn about becoming NEAR developer and you can get a high level overview of blockchain 🙂
Error: "Buffer is not defined' while trying to provoke a near-api-js
omniscientsquid --> Hi, I am trying to get a simple near login to work with my react app running html/js. Webtech such as react are very new to me so please excuse my ignorance. I am trying to provoke a near-api-js requestSignIn to work, but getting an error ‘Uncaught (in promise) ReferenceError: Buffer is not defined’
I dont know if this is a node/react issue or something I have done wrong with the js. I have ensured Buffer is installed with npm, and found some suggestion online that placing this in the main js file will fix it;
import * as buffer from ‘buffer’;
(window as any).Buffer = buffer.Buffer;
However, ‘window’ isn’t accessible through the react framework (or at least it doesn’t seem to be). Does anyone have a suggestion as to where I am going wrong? The code is copied below.
omniscientsquid --> I think I have fixed it with adding ‘global.Buffer = global.Buffer || require(“buffer”).Buffer; // eslint-disable-line’ just under the imports. I have also noticed there is a stackoverflow link for questions, so will head over there next time.
https://rpc.testnet.near.org is a centralized API run by Near foundation?