error: unknown command fill / build / etc
If npx intlayer fill --verbose gives:
Copy the code to the clipboard
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:
Copy the code to the clipboard
This forces npx to pull the most recent version. Then try again:
Copy the code to the clipboard
2. Check if the command is registered
You can check with:
Copy the code to the clipboard
See 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 uses commander as the 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 recognise new commands.
5. If you’re developing intlayer, rebuild and link it
If you're developing intlayer locally:
Copy the code to the clipboard
Then in another terminal:
Copy the code to the clipboard
This uses the local version you’re working on.
6. Clear npx cache (if you're stuck with an older version)
Copy the code to the clipboard
Or manually delete cached intlayer packages:
Copy the code to the clipboard
Check the equivalent if you use pnpm, yarn, bun or another package manager