NodeJS 未找到使用gluegun throws命令构建CLI工具

lawou6xi  于 2023-06-22  发布在  Node.js
关注(0)|答案(1)|浏览(111)

我试图建立一个CLI与gluegun和我遇到了一个错误,而下面的基础教程。以下是我遵循的步骤:

# spin up your new CLI
npx gluegun new movies

# choose TypeScript or Modern JavaScript
# now jump into the source
cd movies

# and link your new executable
yarn link

# and run it!
movies help

运行movies help后,我得到错误消息zsh: command not found: movies

2q5ifsrm

2q5ifsrm1#

确保在~/.zshrc文件中设置了正确的PATH。
添加这一行后:

export PATH="$PATH:`yarn global bin`"

我觉得一切都很好。
查看文档:https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable

相关问题