none
i have an error page when i run my program RRS feed

  • Question

  • C:\Users\Admin\source\repos\main.js:24
            return new Block(0, "01/09/2019", "Genesis Block", "0");
            ^

    ReferenceError: Block is not defined
        at Blockchain.createGenesisBlock (C:\Users\Admin\source\repos\main.js:24:9)
        at new Blockchain (C:\Users\Admin\source\repos\main.js:20:28)
        at Object.<anonymous> (C:\Users\Admin\source\repos\main.js:38:18)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        at Module.load (internal/modules/cjs/loader.js:653:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
        at startup (internal/bootstrap/node.js:283:19)
    Tuesday, November 19, 2019 6:30 AM

All replies

  • Hi citian,

    Welcome to MSDN forum.

    According to this error, you could try to define the new block, before returning it.

    BTW, if it persists, we recommend you could redirect to stack overflow with javascript tag, where you could get dedicated support about JS development.  

    Hope it could help you.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, November 19, 2019 8:11 AM