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

Hardhat config error while building bedrock #3087

Closed
lucadonnoh opened this issue Jul 24, 2022 · 19 comments
Closed

Hardhat config error while building bedrock #3087

lucadonnoh opened this issue Jul 24, 2022 · 19 comments
Labels
A-pkg-contracts-bedrock Area: packages/contracts-bedrock C-bug Category: bugs S-unconfirmed Status: Issue might be valid, but it’s not yet confirmed

Comments

@lucadonnoh
Copy link
Contributor

lucadonnoh commented Jul 24, 2022

Describe the bug

hardhat.config.ts:54:5 - error TS2322: Type '{ deploy: string; deployments: string; deployConfig: string; }' is not assignable to type 'ProjectPathsUserConfig'.
  Object literal may only specify known properties, and 'deployConfig' does not exist in type 'ProjectPathsUserConfig'.

while building bedrock

To Reproduce
Steps to reproduce the behavior:

  1. clone repo
  2. cd optimism/packages/contracts-bedrock
  3. yarn
  4. yarn build

Screenshots
image

Additional context
Foundry is installed.

@wsdt
Copy link
Contributor

wsdt commented Jul 25, 2022

same issue

@bradyjoestar
Copy link

same issue here.

@smartcontracts
Copy link
Contributor

Investigating

@smartcontracts
Copy link
Contributor

Do you observe the same issue if you build at the root level? cd optimism && yarn clean && yarn install && yarn build

@smartcontracts
Copy link
Contributor

My guess is that you need to build the hardhat-deploy-config package first. I generally recommend building at the root level, which should automatically figure out the dependency graph and build packages in the correct order.

@smartcontracts smartcontracts added C-bug Category: bugs S-unconfirmed Status: Issue might be valid, but it’s not yet confirmed A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Jul 25, 2022
@lucadonnoh
Copy link
Contributor Author

lucadonnoh commented Jul 25, 2022

Do you observe the same issue if you build at the root level? cd optimism && yarn clean && yarn install && yarn build

nope it works for me

@wsdt
Copy link
Contributor

wsdt commented Jul 25, 2022

receiving this now:

 "C:\Users\Kevin Riedl\Desktop\boba\bedrock\optimism\packages\contracts-bedrock\node_modules\.bin\\node.exe"  "C:\Users\Kevin Riedl\Desktop\boba\bedrock\optimi
sm\packages\contracts-bedrock\node_modules\.bin\\..\..\..\..\node_modules\typechain\dist\cli\cli.js" --target ethers-v5 --out-dir dist/types --glob 'artifacts/!(build-info)/**/+([a-zA-Z0-9_]).json'

"/**/+([a-zA-Z0-9_]).json'" syntactically wrong


Previously I got this:

lerna ERR! yarn run build stderr:
Solidity 0.8.10 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/reference/solidity-support

warning: Unknown section [ci] found in foundry.toml. This notation for profiles has been deprecated and may result in the profile not being registered in future versions. Please use [profile.default] instead or run `forge config --fix`.
warning: Unknown section [default] found in foundry.toml. This notation for profiles has been deprecated and may result in the profile not being registered in future versions. Please use [profile.default] instead or run `forge config --fix`.
warning: Unknown section [default] found in node_modules\excessively-safe-call\foundry.toml. This notation for profiles has been deprecated and may result in the profile not being registered in future versions. Please use [profile.default] instead or run `forge config --fix`.
"/**/+([a-zA-Z0-9_]).json'" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
error Command failed with exit code 255.
error Command failed with exit code 255.
lerna ERR! yarn run build exited 255 in '@eth-optimism/contracts-bedrock'
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Still receiving this after a clean install + yarn install + yarn build on root.

I then did forge config --fix in the bedrock-contracts folder and get now the error on top.

@smartcontracts
Copy link
Contributor

@wsdt are you on Windows?

@wsdt
Copy link
Contributor

wsdt commented Jul 25, 2022

yes. Trying now on Linux subsystem.

@wsdt
Copy link
Contributor

wsdt commented Jul 25, 2022

ok yeah it only doesn't work on windows

@Kukoomomo
Copy link

same issue

@Kukoomomo
Copy link

Mac use npm install @eth-optimism/hardhat-deploy-config success!

@wsdt
Copy link
Contributor

wsdt commented Jul 26, 2022

Windows is the issue

@tynes
Copy link
Contributor

tynes commented Jul 27, 2022

Unfortunately we don't have anybody on the team that uses windows without WSL so its hard to keep compatibility. Definitely recommend a unix based environment.

Also be sure to build from the root because the contracts-bedrock package imports from other packages in the monorepo

@wsdt
Copy link
Contributor

wsdt commented Jul 28, 2022

Yes used WSL then and it worked. Thanks

@ivanvpan
Copy link

ivanvpan commented Jun 3, 2023

Seeing the issue on Linux.
EDIT: Removing the repo, cloning afresh and rerunning install/build steps fixed it.

@GrapeBaBa
Copy link
Contributor

I met this issue on macOS

@GrapeBaBa
Copy link
Contributor

Mac use npm install @eth-optimism/hardhat-deploy-config success!

it doesn't works for me

@GrapeBaBa
Copy link
Contributor

It seems I found the issue, the node version must be 16.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-pkg-contracts-bedrock Area: packages/contracts-bedrock C-bug Category: bugs S-unconfirmed Status: Issue might be valid, but it’s not yet confirmed
Projects
None yet
Development

No branches or pull requests

8 participants