I've just set up a new Angular 4 project using the Angular CLI. Just after creating it, I ran ng e2e
and the sample end-to-end test executed perfectly. After this, I've added a subfolder inside the app
folder called services
, and generated a service inside that folder. Now, when I run ng e2e
, it errors out with the following error:
[09:11:56] E/configParser - Error message: failed loading configuration file protractor.conf.js [09:11:56] E/configParser - Error: Cannot find module 'C:\Projects\new\test-project\src\app\services\protractor.conf.js
Any idea why this could be happening? I think I might need to prevent the e2e script from looking inside the services folder, but I'm not sure how to do that.
So sounds like you have your
protractor.conf.js
config file is missing on this pathC:\Projects\new\test-project\src\app\services\protractor.conf.js
. To restore that you can just runng new some-app
and copy it over.To ansewer on your conmment no, you do not have to create
protractor.conf.js
for each folder there is just one config per app. When you generating a service or component Angular cli generating a.spec
file but that is different and related tokarma
that is runs withng t
orng test
ornpm run test
.Also, if you just starting with Angular, I would recommended to use the latest cli.