ava: "Enhancement compilation must be configured in AVA’s Babel options" error with TypeScript.
I’m trying to run some unit tests with TypeScript using ts-node
package as described in official ava’s TS recipe.
Facing an error:
> node ./node_modules/ava/cli.js
✖ Enhancement compilation must be configured in AVA’s Babel options.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! some_package@0.0.1 test: `node ./node_modules/ava/cli.js`
npm ERR! Exit status 1
Node version: 13.6.0
Ava version: 3.0.0
TypeScript version: 3.7.5
OS: Linux Mint 19.1 (Tessa)
Running ava both ways leads to same result:
node ./node_modules/ava/cli.js
as locally installed
ava
as globally installed.
Must note that with ava v2.4.0 everything works as expected. Repository to reproduce: https://github.com/meyve/ava_test
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (9 by maintainers)
Commits related to this issue
- docs(typescript): Updates Typescript Recipe Previous iteration had configuration that is no longer necessary for version 3. Closes #2376 — committed to jhechtf/ava by deleted user 4 years ago
- Remove v2 configuration from TypeScript recipe Fixes #2376 — committed to avajs/ava by jhechtf 4 years ago
@jhechtf that’d be amazing!
I’m currently using ava in a typescript project without babel, which is why the requirement for babel was so strange to me.
I’m also using ava 3 - should it not need the babel step? Do we just remove the babel key? What configuration for ava v3 makes typescript work without babel?
On Tue, Jan 21, 2020, 01:28 Mark Wubben notifications@github.com wrote:
Try this