1

I'm new to protractor, can somebody tell me how to fix error code 105

Q$ protractor conf.js
[16:29:26] E/configParser - Error code: 105
[16:29:26] E/configParser - Error message: failed loading configuration file conf.js
[16:29:26] E/configParser - Error: Cannot find module '/Users/q/conf.js'
 at Function.Module._resolveFilename (module.js:538:15)
 at Function.Module._load (module.js:468:25)
 at Module.require (module.js:587:17)
 at require (internal/module.js:11:18)
 at ConfigParser.addFileConfig (/usr/local/lib/node_modules/protractor/built/configParser.js:128:26)
 at Object.initFn [as init] (/usr/local/lib/node_modules/protractor/built/launcher.js:93:22)
 at Object.<anonymous> (/usr/local/lib/node_modules/protractor/built/cli.js:219:10)
 at Module._compile (module.js:643:30)
 at Object.Module._extensions..js (module.js:654:10)

I'm trying to do this using tutorial on protractor site.

Michael Durrant
25.3k3 gold badges42 silver badges114 bronze badges
asked Jan 15, 2018 at 8:42

4 Answers 4

2

Error: Cannot find module '/Users/q/conf.js'

Seems that you're probably running your protractor CLI command from a directory that the file doesn't exist in. It looks like you're trying to run this from your user's home directory and not a project folder, etc. so I'm a little suspicious based on those paths.

answered Jan 15, 2018 at 9:26
0

Code:

exports.config = {
 directConnect: true,
 framework: 'jasmine',
 seleniumAddress: 'https://localhost:4444/wd/hub',
 specs: ['spec.js'],
}

I am getting following error, kindly suggest me some solution on this:

Error:

C:\Users\prave\WV Automation>protractor config.js
[17:53:50] E/configParser - Error code: 105
[17:53:50] E/configParser - Error message: configuration file config.js did not export a config object
[17:53:50] E/configParser - Error: configuration file config.js did not export a config object
 at ConfigParser.addFileConfig (C:\Users\prave\AppData\Roaming\npm\node_modules\protractor\built\configParser.js:141:19)
 at Object.initFn [as init] (C:\Users\prave\AppData\Roaming\npm\node_modules\protractor\built\launcher.js:93:22)
 at Object.<anonymous> (C:\Users\prave\AppData\Roaming\npm\node_modules\protractor\built\cli.js:226:10)
 at Module._compile (internal/modules/cjs/loader.js:1158:30)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
 at Module.load (internal/modules/cjs/loader.js:1002:32)a
 at Function.Module._load (internal/modules/cjs/loader.js:901:14)
 at Module.require (internal/modules/cjs/loader.js:1044:19)
 at require (internal/modules/cjs/helpers.js:77:18)
 at Object.<anonymous> (C:\Users\prave\AppData\Roaming\npm\node_modules\protractor\bin\protractor:5:1)
Bharat Mane
6,78512 gold badges42 silver badges69 bronze badges
answered Apr 15, 2020 at 12:27
0
0

[16:29:26] E/configParser - Error message: failed loading configuration file conf.js

Solution: the loading configuration file error is due to the File Path. I suggest you try the below command and check if it works.

Protractor <Full Path - till C:/...../conf.js>

JAINAM
1,8453 gold badges19 silver badges39 bronze badges
answered Jul 9, 2020 at 14:55
0

I received the same error on Jenkins run, while locally my Protractor tests worked fine. The issue was that .gitignore had excluded all .js (/e2e/*.js) files compiled from .ts, and the config js file was not sent to the origin repo.

The fix was as simple as to add !*.conf.js to the .gitignore and push the commit to the origin.

Make sure you have your config files in the path it should be :)

answered Apr 8, 2022 at 15:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.