Skip to content

[Bug]: ts-jest[cli] (FATAL) Configuration file jest.config.cjs must be a JavaScript or JSON file. with config.migrate in vite react project #4485

@Amy-B-Tradition

Description

@Amy-B-Tradition

Version

^29.1.1

Steps to reproduce

I'm in the middle of a Parcel 1 > Vite upgrade.
After getting my tests running again, I got the following message:
ts-jest[backports] (WARN) Your Jest configuration is outdated. Use the CLI to help migrating it: ts-jest config:migrate <config-file>.

So I entered
ts-jest config:migrate jest.config.cjs
(File extension change was needed because type: "module" was added to package.json for vite).

Expected behavior

Some sort of upgrade wizard or something?

Actual behavior

ts-jest[cli] (FATAL) Configuration file jest.config.cjs must be a JavaScript or JSON file.

Debug log

None

Additional context

No response

Environment

Need to install the following packages:
envinfo@7.13.0
Ok to proceed? (y)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions