NPM 包错误 - 'newman' 未被识别为内部或外部命令 [英] NPM Package Error- 'newman' is not recognized as an internal or external command
问题描述
我已经在我的 64 位 Win 10 机器上安装了最新版本的 Newman (3.10.0).
I have installed the latest version of Newman (3.10.0) in my 64-Bit Win 10 Machine.
C:\Users\ABC>npm install -g newman
C:\Users\ABC\AppData\Roaming\npm\newman -> C:\Users\ABC\AppData\Roaming\npm\node_modules\newman\bin\newman.js
+ newman@3.10.0
added 195 packages in 57.852s
但是,我无法使用 newman,并且在访问时遇到以下错误.
However, I am not able to use the newman and I am getting below error while accessing.
C:\Users\ABC>newman -h
'newman' is not recognized as an internal or external command,
operable program or batch file.
我为 NODE_PATH 添加了一个环境变量,指向 newman 目录 C:\Users\ABC\AppData\Roaming\npm\node_modules\newman
I have added an environment variable for the NODE_PATH pointing to the newman directory C:\Users\ABC\AppData\Roaming\npm\node_modules\newman
但没有运气.有人可以帮忙吗.
but no luck. Could some one please help.
推荐答案
此问题已在使用 Node 应用程序进行故障排除后得到解决.我的机器上安装了以前版本的 Node(32 位),但在我卸载后并没有完全删除.当我安装 Node 64-Bit 时,这两个条目都存在于环境变量中并导致了冲突.
The issue was fixed after troubleshooting with the Node Application. A previous version of Node (32-bit) was installed in my machine and it was not completely removed after I did an uninstall. When I installed Node 64-Bit both entry was present in the environment variable and caused a conflict.
当我手动删除安装文件夹和 env 变量时,newman 正常工作.
When I manually deleted both installation folder and the env variable the newman worked correcly.
这篇关于NPM 包错误 - 'newman' 未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!