protractor
protractor copied to clipboard
ts-node -> register -> tsconfig.e2e.json -> error because parse of "node_modules\tsconfig\src\tsconfig.ts" why?
Bug report
- Node Version:
8.12.0 - Protractor Version:
5.4.1 - Angular Version:
5.2.5 - Browser(s):
headless chrome - Operating System and Version
win10 - Your protractor configuration file
...
onPrepare() {
require('ts-node').register({
project: 'tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
...
- A relevant example test
- Output from running the test
E/launcher - Error: SyntaxError: Unexpected token ] in JSON at position 419
at JSON.parse (<anonymous>)
at parse (node_modules\tsconfig\src\tsconfig.ts:195:15)
at readFileSync (node_modules\tsconfig\src\tsconfig.ts:181:10)
at Object.loadSync (node_modules\tsconfig\src\tsconfig.ts:151:18)
at readConfig (node_modules\ts-node\src\index.ts:455:18)
at Object.register (node_modules\ts-node\src\index.ts:205:18)
at onPrepare (protractor.conf.js:86:24)
at q_1.Promise (node_modules\protractor\built\util.js:46:49)
at Function.promise (node_modules\q\q.js:682:9)
at Object.runFilenameOrFn_ (node_modules\protractor\built\util.js:38:16)
at plugins_.onPrepare.then (node_modules\protractor\built\runner.js:98:27)
at _fulfilled (node_modules\q\q.js:834:54)
at self.promiseDispatch.done (node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (node_modules\q\q.js:796:13)
at node_modules\q\q.js:556:49
at runSingle (node_modules\q\q.js:137:13)
- Steps to reproduce the bug
ng e2e
Nobody? It really looks like the combination of ts-node::require and protractor, tries to compile it's own config-template-sources.. there is no way for an framework(protractor)-user like me, to see behind the process, without the knowledge of the deep function of your framework. thanks.
Hi, @maks187 ! Try to run tests in this example project and notify me about the results.