This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Description
Hi,
We recently decided to control easy installation of protractor on local machines (by specifying it in package.json) instead of installing individually with -g flag. So addition is something like this
"scripts": {
"protractor": "protractor protractor.config.js --directConnect"
}
After that when I try to execute protractor using
npm run protractor
It gives following console error after running tests.
npm ERR! Failed at the @ protractor script 'sudo protractor protractor.config.js --directConnect'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
.....
....
Running protractor using following command works fine.
node_modules/protractor/bin/protractor protractor.config.js --directConnect
Also it works ok if protractor is installed as global package and run as below
protractor protractor.config.js --directConnect
Only problem that running it as scripts always gives errors after tests run is finished.