Skip to content

ts-jest config:init generated config has type error #2772

@bobstrange

Description

@bobstrange

🐛 Bug Report

I was trying to init jest config with npx ts-jest config:init then I got an error.

Cannot find module '@ts-jest/dist/types' or its corresponding type declarations.

/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
};

It is introduced by #2742.
Just remove @ from @ts-jest fixes the bug.

To Reproduce

Steps to reproduce the behavior:

Expected behavior

There shouldn't be any type error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions