-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed loading configuration file protractor.conf.js ( Protractor Version 5.2.0 ) #18
Comments
Have you done a npm install after cloning the project? error seems to suggest the protractor module can't be found. |
I also got that issue. After i install npm, it worked 😄 . Thanks @surenr |
@surenr |
Error message: failed loading configuration file conf.js |
@Shabbir124 : I was facing the same error . While saving conf.js we need to add "conf.js" so as to make the file as javascript file else it will take it as a text file only. So just save conf.js file as "conf.js" and similarly spec file also and it will work. |
I am trying to add cucumber-protractor-steps to a cucumber-protractor-selenium docker image. For some reason it cannot load the module when I run the project. |
I have the same issue, but i don't know the solution, somebody can help me ? conf.js: exports.config = { spec.js: When a run this line "protractor conf.js" i have this issue: [13:52:11] E/configParser - Error code: 105 SyntaxError: Invalid or unexpected token Somebody can help me please ? Protractor version "5.4.2" |
I too facing the same issues when only try to create an instance of module/page in the 'beforeLaunch' hook in the config.ts file. If commented the 'beforeLaunch' code it is working as expected, below is my config.ts file looks - config.tsimport { ProtractorBrowser, Config } from 'protractor'; params: { seleniumAddress: 'http://localhost:4444/wd/hub', ], onPrepare: () => { Please refer the error -
[17:30:19] E/configParser - Error code: 105 |
I got to know the issue is, in the confg.js file, there is 'params' block where I pointed to some test JSON files, these are invoked from page-level but if I call from config.js file its kind of ambiguous due to this params block is not functioning correctly. |
I am unable to generate reports in protractor //config.js exports.config = {
}; //Error |
Somebody, please help I still facing the issue failed loading configuration file conf.js [18:45:35] E/configParser - ReferenceError: spec1 is not defined |
I am having same issue |
I'm having same issue:
Still not working ! |
I am having the same issue, but just after run the following command: |
Use the below snippet. This worked for me var HtmlReporter = require('protractor-beautiful-reporter'); exports.config = { onPrepare: function() { |
PS C:\Users\Ahsan\Desktop\Projects> protractor .\conf\conf.js I am Having the Same Issue ,someone please suggest me the solution |
In my case, I had a freshly installed node which made the existing protractor project causing this type of errors. To fix this issue, I had to install npm with npm install npm@latest -g and then ** webdriver-manager update** command to update the driver. |
Solution for protractor screenshot issue npm install -g protractor-jasmine2-html-reporter Run below command to link protractor and jasmine2-html-reporter to aovid report not generating issue. Please see Girish Sortur's answer in How to create Protractor reports with Jasmine2 npm link protractor-jasmine2-html-reporter Also add this import with path to exact node module to avoid the error in windows 10 var Jasmine2HtmlReporter = require('C:/Users/sam/AppData/Roaming/npm/node_modules/protractor- var Jasmine2HtmlReporter = require('C:/Users/sam/AppData/Roaming/npm/node_modules/protractor-jasmine2-html-reporter'); exports.config = { capabilities: {
|
This exception occurs when I tried to run the test
[12:29:41] E/configParser - Error code: 105
[12:29:41] E/configParser - Error message: failed loading configuration file protractor.conf.js
[12:29:41] E/configParser - Error: Cannot find module 'protractor'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Muditha\git\CodeSpecJS\protractor.conf.js:4:17)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
The text was updated successfully, but these errors were encountered: