You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project with "allowJs": true in tsconfig.json where I get errors like this:
31 05 2020 15:49:10.978:ERROR [config]: Error in config file!
TypeError: karma.conf.js: Emit skipped
at getOutput (/project/node_modules/ts-node/src/index.ts:560:17)
at Object.compile (/project/node_modules/ts-node/src/index.ts:762:32)
at Module.m._compile (/project/node_modules/ts-node/src/index.ts:841:43)
at Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Object.require.extensions.<computed> [as .js] (/project/node_modules/ts-node/src/index.ts:844:12)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.parseConfig (/project/node_modules/karma/lib/config.js:358:22)
This unexpected behaviour here is that karma.conf.js is interpreted by ts-node. The explanation for this behaviour is here:
TypeScript Node works by registering the TypeScript compiler for .tsx? and .jsx? (when allowJs == true) extensions.
I have a project with
"allowJs": true
intsconfig.json
where I get errors like this:This unexpected behaviour here is that
karma.conf.js
is interpreted by ts-node. The explanation for this behaviour is here:from https://github.com/TypeStrong/ts-node#how-it-works, which is used by
require('ts-node').register()
in Karma'slib/config.js
.I think only .ts config files should be handled by ts-node.
The text was updated successfully, but these errors were encountered: