PhillipJ
PhillipJ

Reputation: 21

protractor configuration problems when running

Just started working on npm and Protractor but was unable to resolve this. I have installed protractor v3.3.0, npm 3.9.0. Webdriver works well

λ protractor conf.js
[14:00:04] E/configParser - error code: 105
[14:00:04] E/configParser - description: failed loading configuration file conf.js

> C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:130
>             throw new exitCodes_1.ConfigError(logger, 'failed loading configuration file ' + filename);
>             ^  Error
>     at ConfigError.ProtractorError (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:10:22)
>     at new ConfigError (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:26:16)
>     at ConfigParser.addFileConfig (C:\Users\JohnTest\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:130:19)
>     at Object.initFn [as init] (C:\Users\jj07251\AppData\Roaming\npm\node_modules\protractor\built\launcher.js:94:22)
>     at Object.<anonymous> (C:\Users\jj07251\AppData\Roaming\npm\node_modules\protractor\built\cli.js:130:10)
>     at Module._compile (module.js:409:26)
>     at Object.Module._extensions..js (module.js:416:10)
>     at Module.load (module.js:343:32)
>     at Function.Module._load (module.js:300:12)
>     at Module.require (module.js:353:17)

Upvotes: 1

Views: 1104

Answers (2)

bwarff
bwarff

Reputation: 385

Go into the directory where the conf.js is located and run protractor from there.

Upvotes: 0

HardikT
HardikT

Reputation: 751

Give the exact path, i.e "e2e-tests/protractor.conf.js" (as it is in my case). And if it still gives some error, add these lines to your protractor.conf.js file-

chromeOnly: true,
directConnect: true

Hopefully this should work!

(PS- when I gave the command "protractor conf.js", it gave me the same error)

Upvotes: 1

Related Questions