Migrating from JS to TS partially throws TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" #12662
-
Hello, I am trying to migrated from JS to TS incrementally. So I've started with two files under constants folder called variables.ts and data.ts However when running yarn test then @wdio/config:ConfigParser: Failed loading configuration file: file:///Users//Projects/**/configs/wdio.conf.js: Unknown file extension ".ts" for /Users//Projects//constants/variables.ts my tsconfig.json looks like this
and my package json has type:"module" inside it. How can make yarn tests work again? Thank |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Even though you are importing a import {} from "../constants/variables.js" ? |
Beta Was this translation helpful? Give feedback.
Managed to solve this by changing to "target": "ES2016"