node.js - 本地安装时,“Protractor ”不被识别为内部或外部命令

标签 node.js angular

我使用“npm install protractor”在本地文件夹中安装了protractor。安装完成后,我使用 protractor --version 检查了 Protractor 的版本。

但它给出了错误:

'protractor' is not recognized as an internal or external command, operable program or batch file

如何解决这个错误?

最佳答案

我在 Windows Server 2016 上遇到类似的问题。以下步骤应该可以解决该问题:

确保安装是全局的。

npm install -g protractor

确保 npm 已在 PATH 环境变量中设置。转到“编辑系统的环境变量”,将以下行附加到 Path 变量。

%USERPROFILE%\AppData\Roaming\npm

关于node.js - 本地安装时,“Protractor ”不被识别为内部或外部命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44582569/

相关文章:

node.js - '找不到该进程类型' heroku Node 部署

css - Flex 布局 - "flex-basis: 1e-09px"是什么意思?

javascript - 如何使用 Phusion Passenger 更正此 ESM 错误?

angular - 如何在Angular2中默认打开日期选择器?

angular - 在升级到 Angular 9 期间,Typescript 编译中缺少 main.ts 和 polyfills.ts

angular - Angular 2 中的打字机效果

Angular 2.0 版本 : Pipes and Directives are not properties of @Component anymore

json - 在 Node 和 React 中使用 JSON 数据库

node.js - NodeJS SSL 错误

node.js - 如何进行屏幕录制并实时保存在s3等云存储中