So I'm new to Stellar and want to build and sign transactions using the JS SDK instead of using the Stellar Laboratory.

I'm starting with the basic wallet documentation. I followed the steps until the end of the page. However, when I run npm start, it gives me this error

sass error
Undefined variable.
src/global/style.scss textarea { font-family: $font-family; font-size: 15px;

which is the same error encountered in this post. The answer there was not very helpful as it's outdated.

So I cloned their GitHub repo code, installed the packages and started the server, which works as intended.

To fix the sass error in my code from the tutorial, I copied the first two lines of style.scss from the GitHub code:

$font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
$font-mono: monospace;

However, when I go to localhost:3333 the page is empty. In the developer console, I find two more errors:

// first error
TypeError: global is undefined
    <anonymous> http://localhost:3334/build/stellar-wallet.entry.js:529
    <anonymous> http://localhost:3334/build/stellar-wallet.entry.js:530
 undefined index-bf4c07c5.js:2903:63
// second error
Uncaught (in promise) Error: Constructor for "stellar-wallet#undefined" was not found
    initializeComponent http://localhost:3334/build/index-bf4c07c5.js:2040

I wanted to ask how to fix this but I don't think the errors stop here since the sample code and tutorial do not match. Does anyone have any advice on how to get started with Stellar's JS SDK?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.