量角器MAC安装问题 - 量角器 - version zsh:找不到命令:量角器
我有兴趣将量角器用于E2E测试。但是在Mac(MacOS Catalina)上遇到一些可能的安装问题。我遇到的主要问题是试图从命令行验证突起的版本时。我在输入量角器 - version,zsh:找不到命令时会收到以下消息:量角器。
安装步骤:
步骤1:下载和安装node.js https://nodejs.org/en/download/ 验证的节点-V V14.17.0 验证的NPM -V。 6.14.13
步骤2:安装量角器
- 验证NPM安装-G量角器
-Cannot验证量角器 - version。我收到此消息:ZSH:找不到命令:量角器。
我知道如何在Windows笔记本电脑上解决此问题。但是不知道如何在Mac上。感谢您的帮助。 image
I'm interested in using Protractor for e2e testing. But running into some possible installation issues on a Mac(macOS Catalina). The main problem I'm having is when trying to verify Protractor's version from the command line. I get the following message when entering protractor --version, zsh: command not found: protractor.
Installation steps:
Step 1 : Download and install node.js
https://nodejs.org/en/download/
verified node -v v14.17.0
verified npm -v. 6.14.13
Step 2 : Install Protractor
-verify npm install -g protractor
-Cannot verify protractor --version. I get this message: zsh: command not found: protractor.
I know how to solve this issue on a windows laptop. But have no idea how to on a mac. Thanks for any help.
image
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选项
-g
在npm install -G stractor
结果中,将量角器安装到NPM Global Package位置,因此您需要将位置附加到path
环境,否则OS找不到它。您可以从CMD
NPM配置列表
输出的前缀
获得该位置。或者,您通过
npm config prefix<一个绝对文件夹路径>
将全局软件包位置配置为所需的文件夹,然后将文件夹路径附加到path
环境中,运行npm安装-g量角
The option
-g
innpm install -g protractor
results the protractor is installed to npm global package location, so you need to append the location intoPATH
environment, otherwise OS can't find it.You can get that location from
prefix
of cmdnpm config list
output.Or you config global package location to you desired folder by
npm config prefix <a absolute folder path>
, then append the folder path intoPATH
environment, runnpm install -g protractor