error: unknown command fill / build / etc
If npx intlayer fill --verbose gives:
error: unknown command 'fill'but you're sure the fill command should exist, here are the steps to resolve it:
1. Ensure you're using the latest version
Run:
npx intlayer --version # current locale intlayer versionnpx intlayer@latest --version # current latest intlayer versionThis forces npx to pull the most recent version. Then try again:
npx intlayer@latest build --verbose2. Check if the command is registered
You can check with:
npx intlayer --help # provide informations related to the commandsSee if the command appears in the command list.
Go to the repo, and confirm that your command is exported and registered in the CLI entry point. Intlayer used commander as framework.
Code regarding the CLI: https://github.com/aymericzip/intlayer/blob/main/packages/%40intlayer/cli/src/cli.ts
4. Restart your terminal
Sometimes a terminal restart is needed to recognize new commands.
5. If you’re developing intlayer, rebuild and link it
If you're developing intlayer locally:
# In the intlayer directorynpm installnpm run buildnpm linkThen in another terminal:
intlayer fill --verboseThis uses the local version you’re working on.
6. Clear npx cache (if you're stuck with an older version)
npx clear-npx-cacheOr manually delete cached intlayer packages:
rm -rf ~/.npm/_npxCheck equivalent if you use pnpm, yarn, bun or other package manager