-
Notifications
You must be signed in to change notification settings - Fork 2
Add pitfall: mops.toml must be in project root #139
Description
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.tomlmust be in the project root (next toicp.yaml), not in the Motoko source directory. The Motoko recipe runsmopscommands from the project root, so placingmops.tomlelsewhere causesmops toolchain bin mocto 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