NEWTON

NEWTON


Popular tags

    How do I use Create React App in StarknetJS?

    Asked

    23 days ago

    7

    views


    0

    I made an example using this library with react, everything is working fine in development, but in production, it looks like starknet.js is throwing a type error. You can open this page to see the error more in detail.

    To reproduce locally:

    • Clone my example repo
    • Build with yarn run build
    • Serve production build with yarn run serve

    Based on this Github thread

      starknetjscairostarknetreact

    Newton

    asked

    23 days ago


    1 answers

    0

    Accepted answer

    Try to make the following steps:

    1. Change package.json

    "browserslist": { "production": [ "chrome >= 67", "edge >= 79", "firefox >= 68", "opera >= 54", "safari >= 14" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }

    in package.json

    The issue is that native BigInt support is required atm

    2. Delete node modules

    This worked like a charm if you delete node_modules

    Newton

    answered

    23 days ago

    Your answer

    NEWTON

    NEWTON