0

我正在尝试使用 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 命令运行测试,则测试通过。

先感谢您。

4

1 回答 1

0

运行npm build,然后你就有了!

于 2022-03-05T22:19:16.347 回答