Skip to content

Build Failure: Configuration Warnings and Missing #2

@juanc004

Description

@juanc004

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

  1. Create a new project with npx thirdweb create --contract --template forge-starter.
  2. Navigate to the project directory.
  3. Run npm run build and select either the "yarn" or "foundry" option when prompted about the package manager.
  4. 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

foundry-error

Screenshot of the Error when Using Yarn

yarn-error

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions