Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile / build / work #8

Open
d13co opened this issue Nov 8, 2023 · 0 comments
Open

Does not compile / build / work #8

d13co opened this issue Nov 8, 2023 · 0 comments

Comments

@d13co
Copy link

d13co commented Nov 8, 2023

Two issues:

  • Building, running, testing: some build configuration files seem to be missing
  • tsc -w throws errors

Would be good to get the build instructions documented, BUILD.md does not indicate any special preparation is required.

Building, Running, Testing

Build & Test fail with:

> react-app-rewired build

node:internal/modules/cjs/loader:942
  throw err;
  ^

Error: Cannot find module '/home/bit/code/pww/config-overrides'
Require stack:
- /home/bit/code/pww/node_modules/react-app-rewired/config-overrides.js
- /home/bit/code/pww/node_modules/react-app-rewired/overrides/paths.js
- /home/bit/code/pww/node_modules/react-app-rewired/scripts/build.js

Start fails with:

> [email protected] start
> env-cmd -e common,development react-app-rewired start

Error: Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json]

tsc errors

Typescript also does not compile with the following errors:


src/account/page/success/card/AccountSuccessCard.tsx:35:29 - error TS2344: Type '"portfolio_value_usd" | "portfolio_value_algo"' does not satisfy the constraint 'keyof PortfolioOverview'.
  Type '"portfolio_value_usd"' is not assignable to type 'keyof PortfolioOverview'.

35     Pick<PortfolioOverview, "portfolio_value_usd" | "portfolio_value_algo"> | undefined
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/account/page/success/card/AccountSuccessCard.tsx:77:41 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.

77               ? usdFormatter(parseFloat(addedAccountOverview.portfolio_value_usd), {
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/overview/page/overview/portfolio-value/AccountOverviewPortfolioValue.tsx:18:7 - error TS2339: Property 'portfolio_value_usd' does not exist on type '{ current_round: number | null; }'.

18       portfolio_value_usd: portfolioValueUSD,
         ~~~~~~~~~~~~~~~~~~~

src/overview/page/overview/portfolio-value/AccountOverviewPortfolioValue.tsx:19:7 - error TS2339: Property 'portfolio_value_algo' does not exist on type '{ current_round: number | null; }'.

19       portfolio_value_algo: portfolioValueALGO
         ~~~~~~~~~~~~~~~~~~~~

src/overview/util/hook/usePortfolioOverview.tsx:46:11 - error TS2345: Argument of type '{ portfolio_value_usd: string; portfolio_value_algo: string; accounts: {}; current_round: null; }' is not assignable to parameter of type 'SetStateAction<PortfolioOverview | undefined>'.
  Object literal may only specify known properties, and 'portfolio_value_usd' does not exist in type 'PortfolioOverview | ((prevState: PortfolioOverview | undefined) => PortfolioOverview | undefined)'.

46           portfolio_value_usd: "0.00",
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/send-txn/context/SendTxnFlowContext.tsx:52:18 - error TS2339: Property 'portfolio_value_algo' does not exist on type '{ current_round: number | null; }'.

52       overview: {portfolio_value_algo = "", portfolio_value_usd = ""}
                    ~~~~~~~~~~~~~~~~~~~~

src/send-txn/context/SendTxnFlowContext.tsx:52:45 - error TS2339: Property 'portfolio_value_usd' does not exist on type '{ current_round: number | null; }'.

52       overview: {portfolio_value_algo = "", portfolio_value_usd = ""}
                                               ~~~~~~~~~~~~~~~~~~~

Found 7 errors. Watching for file changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant