跟随CosmWasm智能合约教程搭建本地区块链节点时,执行starport add wasm命令出现unknown command "add" for "starport"错误求助
Let’s work through resolving this error you’re facing with Starport. The unknown command "add" issue almost always ties to version mismatches or outdated tooling—here’s what you can try step by step:
1. Check Your Starport Version
Older Starport releases don’t support the add subcommand (this feature was added in later versions, especially after Starport was rebranded to Ignite CLI). First, confirm your current version with:
starport version
If you’re running a version older than v0.26.0, or if the output mentions Starport being deprecated, you’ll need to upgrade to the modern replacement tool.
2. Upgrade to Ignite CLI (Starport’s Successor)
Starport has been officially rebranded to Ignite CLI, and all the add functionality now lives here. Here’s how to make the switch:
- Uninstall the old Starport binary first:
sudo rm -f $(which starport) - Install the latest Ignite CLI:
curl https://get.ignite.com/cli! | bash - Verify the installation worked:
ignite version
Then replace the problematic command with its Ignite equivalent:
ignite add wasm
3. Clean Up Your PATH (If Needed)
Sometimes old Starport binaries can linger in your system’s PATH even after uninstall. Run this to check which binary your terminal is using:
which starport
If it points to an outdated location, update your PATH to prioritize the new Ignite binary, or just use ignite directly for all future commands.
4. Confirm Tutorial Compatibility
Since you’re following a Notion guide, double-check if it’s been updated to reflect the Starport → Ignite rebranding. Many older tutorials still use the starport command name, but all active development now happens under Ignite CLI.
Once you’ve upgraded, the add wasm command should run without issues, and you can get back to setting up your CosmWasm-enabled local node.
内容的提问来源于stack exchange,提问作者p_zuckerman

