-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Description
I encountered compilation failures when trying to build a project with npm run build, after creating a new project using the forge-starter template. The errors occur irrespective of selecting either the "yarn" or "foundry" options when prompted about the package manager to use. The first issue mentioned is an unknown configuration section in foundry.toml. Furthermore, the compiler reports missing sources for forge-std/Script.sol and forge-std/Test.sol, indicating the absence of the forge-std library in the project.
Steps to Reproduce
- Create a new project with
npx thirdweb create --contract --template forge-starter. - Navigate to the project directory.
- Run
npm run buildand select either the "yarn" or "foundry" option when prompted about the package manager. - Observe the compilation errors in the terminal output.
Expected Behavior
The build command should successfully compile the smart contracts without issuing errors, properly handling the foundry.toml configuration and locating the forge-std sources.
Actual Behavior
The compilation process fails, showing a warning about an unknown config section in foundry.toml and errors due to the inability to find the forge-std/Script.sol and forge-std/Test.sol sources.
The errors are consistent across selections of either "yarn" or "foundry" for the package manager option, indicating the issue is not specific to the choice of package manager.
Screenshot of the Error when Using Foundry
Screenshot of the Error when Using Yarn
Environment
- Operating System: macOS
- Node.js version: v21.1.0
- npm version: 10.2.5
- yarn version: 1.22.21
Additional Information
This issue is blocking the progress of project setup and development, as the compilation of smart contracts is a critical step. Any insights or guidance on addressing these errors would be greatly appreciated.