libitx / txforge

Modern Bitcoin transaction builder, capable of supporting any non-standard and custom script type.
Apache License 2.0
64 stars 22 forks source link

Confused Between RunonBitcoin and TxForge - Unsolved Same Syntax Error #21

Closed jsim77 closed 2 years ago

jsim77 commented 2 years ago

Dear Community,

I think I need help as I'm quite confused with the @runonbitcoin/nimble and TxForge. Yes, I downloaded TxForge via NPM into my MacBook. I found that there are 2 separate folders --> 1. @runonbitcoin/nimble and 2. TxForge.

As per the instruction after downloading (I'm using VSCode), I open the Nimble folder to "Run" the p2pkh.js but seems that there's an unsolved error, that is, "SyntaxError: The requested module '@runonbitcoin/nimble' does not provide an export named 'default'

import nimble from '@runonbitcoin/nimble' ^^^^^^

The source file of the error comes from ./txforge/src/classes/tape.js:1

Fyi, I did go back to the TxForge folder and then direct locate to src/classes/tape.js:1 --> inside of the code, I did input the following code, export default nimble

import nimble from '@runonbitcoin/nimble' export default nimble

I did save but when I go back to Nimble/classes/p2pkh.js --> the SyntaxError remains the same.

I'm confused because 2 separate folders are unable to call each other even though I have put the 'export default' code.

Have attached the screenshot for your easy reference.

Please guide me, thanks.

Screenshot 2022-08-11 at 5 14 59 PM Screenshot 2022-08-11 at 5 19 44 PM Screenshot 2022-08-11 at 8 52 28 PM
jsim77 commented 2 years ago

Dear Community,

My apology for the inconvenience and the above problem has been solved.

Thanks.