safe-global / safe-infrastructure

One `docker-compose.yml` file to rule them all
MIT License
56 stars 92 forks source link

Web UI with local install #118

Closed choomz closed 9 months ago

choomz commented 11 months ago

Hello,

Currently, when you run the run_locally.sh script, the UI container doesn't launch because it can't compile the contracts. image (1)

If you dig a little deeper, the yarn after-install script doesn't run during assembly : https://github.com/safe-global/safe-wallet-web/blob/dev/package.json#L22

By explicitly adding the script with a command in the docker-compose.yml, it works:

image

I'm opening this issue if it helps anyone and if the team wants to fix it. This issue seems to be related: #116

Thanks :)

JABirchall commented 10 months ago

Im getting the same issue. The UI container is crashing because of build errors.

2023-10-28 05:04:27 yarn run v1.22.19
2023-10-28 05:04:27 $ yarn build && yarn serve
2023-10-28 05:04:27 $ next build
2023-10-28 05:04:29 - info Linting and checking validity of types...
2023-10-28 05:05:12 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-10-28 05:05:12 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-10-28 05:28:41 yarn run v1.22.19
2023-10-28 05:28:42 $ yarn build && yarn serve
2023-10-28 05:28:42 $ next build
2023-10-28 05:28:47 - info Linting and checking validity of types...
2023-10-28 05:28:57 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-10-28 05:28:57 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2023-10-28 05:05:12 Failed to compile.
2023-10-28 05:05:12 
2023-10-28 05:05:12 ./src/components/tx/ApprovalEditor/utils/approvals.ts:1:32
2023-10-28 05:05:12 Type error: Cannot find module '@/types/contracts' or its corresponding type declarations.
2023-10-28 05:05:12 
2023-10-28 05:05:12 > 1 | import { ERC20__factory } from '@/types/contracts'
2023-10-28 05:05:12     |                                ^
2023-10-28 05:05:12   2 | import { UNLIMITED_APPROVAL_AMOUNT } from '@/utils/tokens'
2023-10-28 05:05:12   3 | import type { BaseTransaction } from '@safe-global/safe-apps-sdk'
2023-10-28 05:05:12   4 | import type { DecodedDataResponse, TokenInfo } from '@safe-global/safe-gateway-typescript-sdk'
2023-10-28 05:05:12 error Command failed with exit code 1.
2023-10-28 05:05:12 error Command failed with exit code 1.
2023-10-28 05:28:57 Failed to compile.
2023-10-28 05:28:57 
2023-10-28 05:28:57 ./src/components/tx/ApprovalEditor/utils/approvals.ts:1:32
2023-10-28 05:28:57 Type error: Cannot find module '@/types/contracts' or its corresponding type declarations.
2023-10-28 05:28:57 
2023-10-28 05:28:57 > 1 | import { ERC20__factory } from '@/types/contracts'
2023-10-28 05:28:57     |                                ^
2023-10-28 05:28:57   2 | import { UNLIMITED_APPROVAL_AMOUNT } from '@/utils/tokens'
2023-10-28 05:28:57   3 | import type { BaseTransaction } from '@safe-global/safe-apps-sdk'
2023-10-28 05:28:57   4 | import type { DecodedDataResponse, TokenInfo } from '@safe-global/safe-gateway-typescript-sdk'
2023-10-28 05:28:57 error Command failed with exit code 1.
2023-10-28 05:28:57 error Command failed with exit code 1.
Uxio0 commented 10 months ago

This will be fixed by https://github.com/safe-global/safe-wallet-web/pull/2771

Uxio0 commented 9 months ago

Fixed

JagoFigueroa commented 9 months ago

Was able to try this yesterday and works nicely for me, thank you! Let us know if you encounter any issues after the fix 😄