Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Error with "npm run protractor" #300

Closed
JALND opened this issue Oct 6, 2015 · 5 comments
Closed

Error with "npm run protractor" #300

JALND opened this issue Oct 6, 2015 · 5 comments

Comments

@JALND
Copy link

JALND commented Oct 6, 2015

Hi,

I followed the angular-seed instructions and got the following errors when trying to execute "npm run protractor".

I tried with both Node v4.1.2 and v0.12.7 but got the same result. I also tried try adding the "chromeOnly: true" as suggested in angular/protractor#187 but still didn't work.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'protractor' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ]
5 info preprotractor [email protected]
6 verbose unsafe-perm in lifecycle true
7 info protractor [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec protractor script
10 verbose stack Error: [email protected] protractor: protractor e2e-tests/protractor.conf.js
10 verbose stack Exit status 1
10 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd Z:\Dev Lab\House\IHOUSESolution\Fireplace2
13 error Windows_NT 6.1.7601
14 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "protractor"
15 error node v0.12.7
16 error npm v2.11.3
17 error code ELIFECYCLE
18 error [email protected] protractor: protractor e2e-tests/protractor.conf.js
18 error Exit status 1
19 error Failed at the [email protected] protractor script 'protractor e2e-tests/protractor.conf.js'.
19 error This is most likely a problem with the angular-seed package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error protractor e2e-tests/protractor.conf.js
19 error You can get their info via:
19 error npm owner ls angular-seed
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

Thanks,
Benny

@arthg
Copy link

arthg commented Nov 23, 2015

I am having exact same problem, node version 4.2.2. Any resolution to this issue?

@william-e-schroeder
Copy link

I got this as well... Note I am using the project template from WebStorm.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\nodejs\node.exe',
1 verbose cli 'C:\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'protractor' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ]
5 info preprotractor [email protected]
6 verbose unsafe-perm in lifecycle true
7 info protractor [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec protractor script
10 verbose stack Error: [email protected] protractor: protractor e2e-tests/protractor.conf.js
10 verbose stack Exit status 1
10 verbose stack at EventEmitter. (C:\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (C:\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd C:\NodeProjects\project-tracker
13 error Windows_NT 6.3.9600
14 error argv "C:\nodejs\node.exe" "C:\nodejs\node_modules\npm\bin\npm-cli.js" "run" "protractor"
15 error node v0.12.7
16 error npm v2.11.3
17 error code ELIFECYCLE
18 error [email protected] protractor: protractor e2e-tests/protractor.conf.js
18 error Exit status 1
19 error Failed at the [email protected] protractor script 'protractor e2e-tests/protractor.conf.js'.
19 error This is most likely a problem with the angular-seed package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error protractor e2e-tests/protractor.conf.js
19 error You can get their info via:
19 error npm owner ls angular-seed
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

@gkalpak
Copy link
Member

gkalpak commented Oct 18, 2016

Can you check whether the change proposed in #378 works for you?

@jgpATs2w
Copy link

jgpATs2w commented Nov 8, 2016

[linux solution] I was having trouble running protactor from global scope, but running the version installed in node_modules/.bin/protactor works well (it manages the selenium driver as well at his scope).
I suggest to change the command in package.json to run the local version:

"protractor": "node_modules/.bin/./protractor e2e-tests/protractor.conf.js",

@gkalpak
Copy link
Member

gkalpak commented Nov 8, 2016

@jgpATs2w, npm scripts (i.e. those defined in package.json) do run local versions. Quoting the npm docs:

Package scripts run in an environment where many pieces of information are made available regarding the setup of npm and the current state of the process.
[...]
If you depend on modules that define executable scripts, like test suites, then those executables will be added to the PATH for executing the scripts.

Since #378 has been merged and we didn't hear back from the OP, I assume this is not an issue any more. Closing...

@gkalpak gkalpak closed this as completed Nov 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants