DeclarationError: Identifier already declared

FROM node:lts-alpine

# set working directory
WORKDIR /app

RUN apk upgrade -U -a

RUN apk add -U alpine-sdk python3 py3-pip

RUN yarn global add @decentology/dappstarter wait-on

# install app dependencies
COPY package.json ./
COPY packages/client/package.json ./packages/client/
COPY packages/dapplib/package.json ./packages/dapplib/
COPY packages/server/package.json ./packages/server/
COPY workspace/frame/package.json ./workspace/frame/

RUN yarn install

# add app
COPY . ./

EXPOSE 5000

# start app
CMD ["yarn", "start"]
hilarious-bostenkag-fdtd-dapp-1  | yarn run v1.22.15

hilarious-bostenkag-fdtd-dapp-1  | $ port-precheck 5000 5001 5002

hilarious-bostenkag-fdtd-dapp-1  | $ lerna run dev --no-sort --stream --parallel

hilarious-bostenkag-fdtd-dapp-1  | lerna notice cli v3.22.1

hilarious-bostenkag-fdtd-dapp-1  | lerna info Executing command in 4 packages: "yarn run dev"

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-client: $ wait-on ../dapplib/src/dapp-config.json && npm run client

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-server: $ wait-on ../dapplib/src/dapp-config.json && nest start --exec ts-node-dev --watch --preserveWatchOutput

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame: $ npm run build:css

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: $ run-s faucet-admin deploy

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame: > @decentology/dappstarter-frame@0.1.0 build:css

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame: > tailwindcss build ./src/tailwind.css -o ./src/style.css

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: $ node ./src/faucet 1

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:   

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:    tailwindcss 1.9.6

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:   

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:    🚀 Building: src/tailwind.css

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: 0 0x72a285a77fbc9132572042518a08b564534fe9f7 10000000000000000000

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: $ truffle compile && node ./src/deploy

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:   

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:    ✅ Finished in 3.43 s

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:    📦 Size: 2.29MB

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:    💾 Saved to src/style.css

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame:   

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-frame: $ wait-on ../../packages/dapplib/src/dapp-config.json && react-scripts start

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: Compiling your contracts...

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: ===========================

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: - Fetching solc version list from solc-bin. Attempt #1

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: ✔ Downloading compiler. Attempt #1.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: - Fetching solc version list from solc-bin. Attempt #1

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/Dapp.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/DappLib.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/DappState.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/Migrations.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/imports/custom_nft/Address.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/imports/custom_nft/Context.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/imports/custom_nft/ERC1155Receiver.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/imports/custom_nft/ERC165.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/imports/custom_nft/generator/generator.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/interfaces/IDappState.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/interfaces/IERC1155.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/interfaces/IERC1155MetadataURI.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/interfaces/IERC1155Receiver.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: > Compiling ./contracts/interfaces/IERC165.sol

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: DeclarationError: Identifier already declared.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:   --> project:/contracts/DappState.sol:78:5:

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    |

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: 78 |     mapping (uint256 => mapping(address => uint256)) private balances;

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: Note: The previous declaration is here:

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:   --> project:/contracts/DappState.sol:64:5:

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    |

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: 64 |     mapping(address => uint256) balances;              

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: ,TypeError: Type uint256 is not implicitly convertible to expected type address.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    --> project:/contracts/DappState.sol:553:40:

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:     |

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: 553 |         uint256 fromBalance = balances[id][from];

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:     |                                        ^^

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: ,TypeError: Indexed expression has to be a type, mapping or array (is uint256)

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:    --> project:/contracts/DappState.sol:553:31:

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:     |

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: 553 |         uint256 fromBalance = balances[id][from];

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib:     |                               ^^^^^^^^^^^^

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: Compilation failed. See above.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: Truffle v5.4.30 (core: 5.4.30)

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: Node v16.13.2

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: error Command failed with exit code 1.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: ERROR: "deploy" exited with 1.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: error Command failed with exit code 1.

hilarious-bostenkag-fdtd-dapp-1  | @decentology/dappstarter-dapplib: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

hilarious-bostenkag-fdtd-dapp-1  | lerna ERR! yarn run dev exited 1 in '@decentology/dappstarter-dapplib'

hilarious-bostenkag-fdtd-dapp-1  | lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.

hilarious-bostenkag-fdtd-dapp-1  | error Command failed with exit code 1.

hilarious-bostenkag-fdtd-dapp-1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

hilarious-bostenkag-fdtd-dapp-1 exited with code 1

I also met the same problem.

I choose ethereum, vanilla and others are shown in the picture.

We are deprecating DappStarter. Stay tuned to learn more about our new product Hyperverse!

1 Like