nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.62k stars 2.36k forks source link

What is the path for a custom config when using affected:e2e #551

Closed jared-christensen closed 6 years ago

jared-christensen commented 6 years ago

Im trying to set a config when running affected:e2e but can not seem to figure out the correct path. When I run this...

npm run affected:e2e -- --base=master --head=HEAD --configuration=./dashboard-e2e/protractor.ci.conf.js

I get this...

Testing dashboard-e2e, forgot-e2e, login-e2e
Configuration './dashboard-e2e/protractor.ci.conf.js' could not be found in project 'dashboard-e2e'.
Error: Configuration './dashboard-e2e/protractor.ci.conf.js' could not be found in project 'dashboard-e2e'.
    at Architect.getBuilderConfiguration (/Users/jaredc/Repositories/customer-apps/node_modules/@angular-devkit/architect/src/architect.js:102:23)
    at MergeMapSubscriber._loadWorkspaceAndArchitect.pipe.operators_1.concatMap [as project] (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/models/architect-command.js:64:55)
    at MergeMapSubscriber._tryNext (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/operators/mergeMap.js:122:27)
    at MergeMapSubscriber._next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/operators/mergeMap.js:112:18)
    at MergeMapSubscriber.Subscriber.next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/Subscriber.js:103:18)
    at TapSubscriber._next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/operators/tap.js:109:26)
    at TapSubscriber.Subscriber.next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/Subscriber.js:103:18)
    at MergeMapSubscriber.notifyNext (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/operators/mergeMap.js:141:26)
    at InnerSubscriber._next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/InnerSubscriber.js:30:21)
    at InnerSubscriber.Subscriber.next (/Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/node_modules/rxjs/internal/Subscriber.js:103:18)
/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/node_modules/yargs/yargs.js:1101
      else throw err
           ^

Error: Command failed: node /Users/jaredc/Repositories/customer-apps/node_modules/@angular/cli/bin/ng e2e --configuration=./dashboard-e2e/protractor.ci.conf.js --project=dashboard-e2e
    at checkExecSyncError (child_process.js:603:11)
    at Object.execSync (child_process.js:640:13)
    at /Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/src/command-line/affected.js:139:29
    at Array.forEach (<anonymous>)
    at e2e (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/src/command-line/affected.js:138:14)
    at Object.affected (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/src/command-line/affected.js:46:13)
    at Object.handler (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/src/command-line/nx.js:19:145)
    at Object.runCommand (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/node_modules/yargs/yargs.js:1014:30)
    at Object.get [as argv] (/Users/jaredc/Repositories/customer-apps/node_modules/@nrwl/schematics/node_modules/yargs/yargs.js:957:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! customer-apps@0.0.1-0 affected:e2e: `nx affected:e2e "--base=master" "--head=HEAD" "--configuration=./dashboard-e2e/protractor.ci.conf.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the customer-apps@0.0.1-0 affected:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jaredc/.npm/_logs/2018-05-30T21_45_59_676Z-debug.log
FrozenPandaz commented 6 years ago

Please try this:

npm run affected:e2e -- --untracked --protractorConfig apps/app1-e2e/protractor.conf.js

Or

yarn affected:e2e --untracked --protractorConfig apps/app1-e2e/protractor.conf.js
jared-christensen commented 6 years ago

@FrozenPandaz that worked! Thank you! Is that documented someplace I overlooked? https://github.com/angular/angular-cli/wiki/e2e

jared-christensen commented 6 years ago

Oh, wait I don't see this being all that useful when it has the app name in the path. What am I doing wrong here? I need a way to change the base URL for dev, qa and pilot.

FrozenPandaz commented 6 years ago

@jared-christensen is there still an issue here?

jared-christensen commented 6 years ago

Nope, thanks for all your help!

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.