Concordium / concordium-browser-wallet

Apache License 2.0
11 stars 9 forks source link

Can't build browser wallet wCCD example on Windows #311

Closed Radiokot closed 1 year ago

Radiokot commented 1 year ago

Bug Description I'm trying to follow the build instruction in order to run the wCCD example, but the yarn build command fails.

Steps to Reproduce

Expected Result The app is built successfully and can be launched by yarn start

Actual Result The build fails with the following error:

✘ [ERROR] Could not resolve "@concordium/browser-wallet-api-helpers"

    ../../node_modules/@concordium/wallet-connectors/dist/BrowserWallet.js:13:45:
      13 │ ..._wallet_api_helpers_1 = require("@concordium/browser-wallet-api-helpers");
         ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@concordium/browser-wallet-api-helpers" as external to exclude
  it from the bundle, which will remove this error. You can also surround this "require"
  call with a try/catch block to handle this failure at run-time instead of bundle-time.

The build output contains the incomplete index.html file, which does nothing when started with yarn start

Versions

Radiokot commented 1 year ago

It turned out that in order to build the example, you have to first run yarn build in the packages/browser-wallet-api-helpers directory. Consider adding this step to the wCCD build guide.

dg-concordium commented 1 year ago

@shjortConcordium Readme in the BW also needs to be updated.