Skip to content

Add pitfall: mops.toml must be in project root #139

@marc0olo

Description

@marc0olo

Problem

When setting up a Motoko + frontend project, it's natural to place mops.toml alongside the Motoko source files (e.g. src/backend/mops.toml). However, the @dfinity/motoko recipe runs mops commands from the project root, so mops.toml must live next to icp.yaml.

When mops.toml is in the wrong location, $(mops toolchain bin moc) outputs an error instead of a path, causing the build to fail with:

sh: Error:: command not found

Suggestion

Add a pitfall to either the icp-cli or motoko skill (or both):

mops.toml must be in the project root (next to icp.yaml), not in the Motoko source directory. The Motoko recipe runs mops commands from the project root, so placing mops.toml elsewhere causes mops toolchain bin moc to fail with "command not found."

Context

Neither the icp-cli skill nor the motoko skill currently mentions where mops.toml should be placed relative to icp.yaml. The motoko skill shows the mops.toml format and the icp-cli skill shows recipe configuration, but the required co-location isn't called out.

🤖 Generated with Claude Code

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