JPM 未被识别为命令

JPM not recognized as a command

我正在尝试编写我的第一个 firefox 插件,但我似乎无法让 jpm 工作。我的 OS 是 Windows 7. 我安装了 node js,我正在尝试按照说明进行操作 here to install the add-on sdk. However, after I install jpm and I try running the command, I get the error jpm is not recognized as an internal or external command, operable program, or batch file." below is a screenshot of the command prompt window.

假设 nodejs 文件夹的路径是 C:/nodejs/

您可以从命令行 运行 jpm,但您必须从 nodejs 安装目录执行。

如果你想从任何目录 运行 它,你需要做的是编辑一个名为 PathSystem Variable,由 添加到你的 nodejs 安装路径,如下所示:;C:\nodejs\。然后打开一个新的终端(命令提示符)会话。

例如:go to Control Panel -> search for "system variable" -> edit system variables -> find "Path" system (not user) variable on the list -> edit it -> append ;C:\nodejs\ to the end of its text - > open new command prompt.

我现在 运行正在制作 Windows 的波兰语版本,因此该指南并不准确。我稍后会更新它。 system variable 我的意思是 global system environment variable 而不是 user environment variable.

我遇到了同样的问题... 当您使用 npm --global 选项安装 jpm 时,软件包安装在 c:\users\<your-user-name>\AppData\Roaming\npm\

在您的示例中,您可以通过指定完整路径来调用 jpm

C:\users\B^3\AppData\Roaming\npm\jpm

或按照@Sagi

的建议将 C:\users\B^3\AppData\Roaming\npm 添加到环境变量 PATH