node.js - nexe :术语“nexe”未被识别为 cmdlet、函数、脚本文件或可操作的名称
问题描述
当我们尝试通过 nexe 命令构建 exe 时,我们面临以下问题。这在 Oracle VM 的开发环境中运行良好,但在服务器机器上,这种情况正在发生。Nexe 模块已安装,我可以在 node_modules 文件夹中看到它。请让我知道可能缺少什么。
PS <C:\Program Files\iisnode\www\tcnx>> nexe PLM_Adaptor.js --build
nexe : The term 'nexe' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ nexe PLM_Adaptor.js --build
+ ~~~~
+ CategoryInfo : ObjectNotFound: (nexe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
谢谢,帕万。
解决方案
npm i nexe -g
将在这样的路径中安装 nexe 模块:
C:\Users\your_username\AppData\Roaming\npm
它还将在此文件夹中存储一个名为“nexe.cmd”的文件。这是您在命令行中键入“nexe”时实际执行的文件。为了完成这项工作,请确保 nexe.cmd 存在于提到的 npm 文件夹中(或找到它所在的位置),并确保此文件夹位于 PATH 中,如下所示:
set PATH=%PATH%;C:\Users\your_username\AppData\Roaming\npm
推荐阅读
- java - 我可以使用从蓝牙获取数据的文件写入器进行保存
- java - 使用 Jackson 解析数组
- javafx - 创建构造函数时应用程序构造函数中的异常
- java - 为什么我们应该转换为相同的类型?
- python - 在 Pyomo (Python) 中列出两个索引
- reactjs - 无法从 React.Component 静态函数中读取未定义的属性“已检查”
- html - 圆角表格行之间的空间
- google-cloud-ml - Google Cloud ML 使用对象检测模型返回空预测
- identityserver4 - 允许使用 JWT Claim 访问多个公司
- mysql - 由于数据类型,“字段列表”中的未知列“”