stellar / soroban-example-dapp

End-to-End Example Soroban Dapp
Apache License 2.0
1.03k stars 830 forks source link

LambdaHackWeek: Fix Node Workflow Build Issue #160

Open Julian-dev28 opened 5 days ago

Julian-dev28 commented 5 days ago

Please add PRs to the update-P21 branch

Title:

Description: Resolve the build issue in the Node workflow where the next build command fails due to a type error in contracts.ts during a workflow check in the following pull request: https://github.com/stellar/soroban-example-dapp/pull/154

Error Log:

Failed to compile.

./shared/contracts.ts:8:25
Type error: Property 'testnet' does not exist on type '{ readonly futurenet: { readonly networkPassphrase: "Test SDF Future Network ; October 2022"; readonly contractId: "CAU23MVDEW7VMB3AXC5PL5GZO3HBYZPEIP2P46X4T3AIC4Y7FXYZWES5"; }; }'.

6 |
7 | export const abundance = new Abundance.Client({

8 | ...Abundance.networks.testnet,
| ^
9 | rpcUrl: rpcUrl,
10 | allowHttp: true,
11 |
Error: Process completed with exit code 1.

Tasks:

  1. Review Current Implementation:

    • Review the shared/contracts.ts file to identify the source of the type error.
    • Verify the available networks in the Abundance client.
  2. Update Network Configuration:

    • Correct the network configuration to use the appropriate network available in the Abundance client.
    • Ensure the testnet network configuration is correctly defined or replace it with an available network.
  3. Configure Build Caching:

    • Configure build caching for Next.js to improve build times and provide faster rebuilds.
    • Follow the guidelines in the Next.js documentation for setting up build caching.
  4. Test the Build:

    • Run npm run build to ensure the build completes successfully without errors.
    • Verify that the application runs correctly after the build.
    • Create a PR to test the workflow on Github

Expected Outcome:

Why This Is Important: Fixing this build issue is crucial to ensure the continuous integration and deployment pipeline functions correctly, improving development efficiency and reliability.