当来自命令行的 运行 mfp 时,在 Mac 上找不到命令错误

command not found error on Mac when running mfp from command line

我在 Mac 上收到 mfp: command not found 错误。我显然已经使用 npm install -g path-to-cli-.tgz-file

安装了 mobilefirst-cli

如果 mobilefirst-cli 在 Mac 上成功安装,我如何 check/verify?我尝试 运行 mfp 但出现错误 "Command not found".

如果您使用的是 MobileFirst 8.0 https://mobilefirstplatform.ibmcloud.com/downloads/,那么可执行文件将为 mfpdev

在 zshrc 或 bashrc 中指定路径。 命令:gedit ~/.zshrc 也来源它。 命令:source ~/.zshrc 一旦完成。重新启动终端,您应该能够在 cli 中访问 mfp 命令。