Protractor is not recognized as an internal or ext

2019-02-28 22:59发布

I have protractor installed on windows slave machine. I am trying to run my script using node index.js. If I trigger job from jenkins to run above command it gives error like Protractor is not recognized as an internal or external command, operable program or batch file.. But when I run command directly on slave machine it execute it successfully.

1条回答
贪生不怕死
2楼-- · 2019-02-28 23:58

You can use the Jenkins NodeJS plugin(https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin) to install node and additional npm packages like protractor, grunt, etc.

After installing npm packages at global level, you can select the "Provide Node & npm bin/folder to PATH" checkbox to ensure you can run "protractor", "grunt" into shell or batch command.

Hope this helps.

查看更多
登录 后发表回答