我正在尝试使用 oclif 构建一个 CLI,但它似乎不适用于我尝试过的任何东西。我看到很多人让它为他们工作,所以也许有人可以指出我的问题!
我的步骤:
1. mkdir test && cd test
2. npm init -f
3. npm i oclif
4. npx oclif generate my_test //this generates a new cli
5. cd my_test
6. npx oclif generate command bob
7. npm link
8. npx my_test bob
我总是得到
› Error: command bob not found
如果我这样做也一样./bin/run bob
但是,如果我为 bob 命令运行测试,则测试通过。
先感谢您。