我正在尝试使用 oclif 构建一个命令行界面,但似乎对我尝试的任何内容都不起作用。我看到很多人都能让它正常工作,所以也许有人可以指出我的问题所在!
我的步骤:
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命令,则测试通过。
提前感谢您。