prashant saraogi
prashant saraogi

Reputation: 39

Protractor error when running protractor conf.js

I am getting an error while execution command protractor conf.js

I am trying to run the sample project code available at
https://github.com/qualityshepherd/protractor_example

My error is

D:\Users\protractor_example-master
>protractor conf.js
[13:30:33] E/configParser - error code: 105
[13:30:33] E/configParser - description: failed loading configuration file conf.
js

D:\Users\xxxxxx\node_modules\protractor\built\configParser.js:130
            throw new exitCodes_1.ConfigError(logger, 'failed loading configurat
ion file ' + filename);

Please suggest a solution

Upvotes: 3

Views: 9693

Answers (2)

Jlearner
Jlearner

Reputation: 613

If you are using protractor-jasmine2-html-reporter then it should be installed locally to the folder where your project scripts and conf.js is present.

I was getting the below error

H:\protractorDemo>protractor conf.js

**Error:**
[05:20:41] E/configParser - Error code: 105
[05:20:41] E/configParser - Error message: failed loading configuration file con
f.js
[05:20:41] E/configParser - Error: Cannot find module 'protractor-jasmine2-html-
reporter'
    at Function.Module._resolveFilename (module.js:325:15)

and after installing it using command

npm install protractor-jasmine2-html-reporter --save-dev

on folder 'H:\protractorDemo>' it started working fine.

Upvotes: 0

Emna Ayadi
Emna Ayadi

Reputation: 2460

You have to go into the directory where you have your config file :

cd /yourPath/

Then run your file.

Upvotes: 5

Related Questions